File tree Expand file tree Collapse file tree 7 files changed +25
-19
lines changed
AbpCompanyName.AbpProjectName.Application
AbpCompanyName.AbpProjectName.Core
AbpCompanyName.AbpProjectName.EntityFrameworkCore
AbpCompanyName.AbpProjectName.Web
AbpCompanyName.AbpProjectName.Tests
AbpCompanyName.AbpProjectName.Web.Tests Expand file tree Collapse file tree 7 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 3
3
4
4
"dependencies" : {
5
5
"AbpCompanyName.AbpProjectName.Core" : " 1.0.0.0-*" ,
6
- "Abp.EntityFrameworkCore" : " 0.10.1 " ,
7
- "Abp.AutoMapper" : " 0.10.1 "
6
+ "Abp.EntityFrameworkCore" : " 0.10.3 " ,
7
+ "Abp.AutoMapper" : " 0.10.3 "
8
8
},
9
9
10
10
"frameworks" : {
Original file line number Diff line number Diff line change 2
2
"version" : " 1.0.0.0-*" ,
3
3
4
4
"dependencies" : {
5
- "Abp" : " 0.10.1.2 "
5
+ "Abp" : " 0.10.3 "
6
6
},
7
7
8
8
"frameworks" : {
Original file line number Diff line number Diff line change 2
2
"version" : " 1.0.0.0-*" ,
3
3
4
4
"dependencies" : {
5
- "Abp.EntityFrameworkCore" : " 0.10.1 " ,
5
+ "Abp.EntityFrameworkCore" : " 0.10.3 " ,
6
6
"AbpCompanyName.AbpProjectName.Core" : " 1.0.0.0-*" ,
7
7
"Microsoft.EntityFrameworkCore.SqlServer" : " 1.0.0" ,
8
8
"Microsoft.EntityFrameworkCore.SqlServer.Design" : {
Original file line number Diff line number Diff line change 33
33
"version" : " 1.0.0-preview2-final" ,
34
34
"type" : " build"
35
35
},
36
- "Abp.AspNetCore" : " 0.10.1 "
36
+ "Abp.AspNetCore" : " 0.10.3 "
37
37
},
38
38
39
39
"tools" : {
Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ namespace AbpCompanyName.AbpProjectName.Tests
17
17
public class AbpProjectNameTestModule : AbpModule
18
18
{
19
19
public override void PreInitialize ( )
20
+ {
21
+ Configuration . UnitOfWork . IsTransactional = false ; //EF Core InMemory DB does not support transactions.
22
+ SetupInMemoryDb ( ) ;
23
+ }
24
+
25
+ public override void Initialize ( )
26
+ {
27
+ IocManager . RegisterAssemblyByConvention ( Assembly . GetExecutingAssembly ( ) ) ;
28
+ }
29
+
30
+ private void SetupInMemoryDb ( )
20
31
{
21
32
var services = new ServiceCollection ( )
22
33
. AddEntityFrameworkInMemoryDatabase ( ) ;
@@ -27,19 +38,14 @@ public override void PreInitialize()
27
38
) ;
28
39
29
40
var builder = new DbContextOptionsBuilder < AbpProjectNameDbContext > ( ) ;
30
- builder . UseInMemoryDatabase ( )
31
- . UseInternalServiceProvider ( serviceProvider ) ;
32
-
33
- var options = builder . Options ;
41
+ builder . UseInMemoryDatabase ( ) . UseInternalServiceProvider ( serviceProvider ) ;
34
42
35
43
IocManager . IocContainer . Register (
36
- Component . For < DbContextOptions < AbpProjectNameDbContext > > ( ) . Instance ( options ) . LifestyleSingleton ( )
44
+ Component
45
+ . For < DbContextOptions < AbpProjectNameDbContext > > ( )
46
+ . Instance ( builder . Options )
47
+ . LifestyleSingleton ( )
37
48
) ;
38
49
}
39
-
40
- public override void Initialize ( )
41
- {
42
- IocManager . RegisterAssemblyByConvention ( Assembly . GetExecutingAssembly ( ) ) ;
43
- }
44
50
}
45
51
}
Original file line number Diff line number Diff line change 7
7
"NSubstitute" : " 1.10.0" ,
8
8
"AbpCompanyName.AbpProjectName.Application" : " 1.0.0.0-*" ,
9
9
"AbpCompanyName.AbpProjectName.EntityFrameworkCore" : " 1.0.0.0-*" ,
10
- "Shouldly" : " 2.8.0" ,
11
10
"dotnet-test-xunit" : " 2.2.0-preview2-build1029" ,
12
11
"Microsoft.EntityFrameworkCore.InMemory" : " 1.0.0" ,
13
12
"xunit" : " 2.2.0-beta2-build3300" ,
14
13
"xunit.extensibility.execution" : " 2.2.0-beta2-build3300" ,
15
14
"xunit.runner.visualstudio" : " 2.2.0-beta2-build1149" ,
16
- "Castle.Windsor.MsDependencyInjection" : " 1.0.0" ,
17
- "Abp.TestBase" : " 0.10.1"
15
+ "Castle.Windsor.MsDependencyInjection" : " 1.1.0" ,
16
+ "Shouldly" : " 2.8.1" ,
17
+ "Abp.TestBase" : " 0.10.3"
18
18
},
19
19
20
20
"frameworks" : {
Original file line number Diff line number Diff line change 4
4
"testRunner" : " xunit" ,
5
5
6
6
"dependencies" : {
7
- "Abp.AspNetCore.TestBase" : " 0.10.1 " ,
7
+ "Abp.AspNetCore.TestBase" : " 0.10.3 " ,
8
8
"AbpCompanyName.AbpProjectName.Tests" : " 1.0.0.0-*" ,
9
9
"AbpCompanyName.AbpProjectName.Web" : " 1.0.0-*" ,
10
10
"Microsoft.AspNetCore.Mvc" : " 1.0.0"
You can’t perform that action at this time.
0 commit comments