Skip to content

Commit c447700

Browse files
committed
Fixed dbcontext.
1 parent adec2ba commit c447700

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Templates/All-In-One-Template/MySpaProject/MySpaProject.EntityFramework/EntityFramework/MySpaProjectDbContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public MySpaProjectDbContext()
2525
* Notice that, actually you will not directly create an instance of MySpaProjectDbContext since ABP automatically handles it.
2626
*/
2727
public MySpaProjectDbContext(string nameOrConnectionString)
28+
: base(nameOrConnectionString)
2829
{
2930

3031
}

Templates/All-In-One-Template/MySpaProject/MySpaProject.EntityFramework/MySpaProjectDataModule.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
using System.Reflection;
1+
using System.Data.Entity;
2+
using System.Reflection;
23
using Abp.EntityFramework;
34
using Abp.Modules;
5+
using MySpaProject.EntityFramework;
46

57
namespace MySpaProject
68
{
@@ -15,6 +17,7 @@ public override void PreInitialize()
1517
public override void Initialize()
1618
{
1719
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
20+
Database.SetInitializer<MySpaProjectDbContext>(null);
1821
}
1922
}
2023
}

0 commit comments

Comments
 (0)