File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
SubSonic.Core.DataAccessLayer/src/Builders Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ public DbContextOptionsBuilder RegisterProviderFactory(string providerInvariantN
139139 return this ;
140140 }
141141
142- public void SetServiceProvider ( IServiceProvider provider )
142+ public DbContextOptionsBuilder SetServiceProvider ( IServiceProvider provider )
143143 {
144144 if ( provider is null )
145145 {
@@ -150,6 +150,8 @@ public void SetServiceProvider(IServiceProvider provider)
150150 {
151151 SubSonicContext . ServiceProvider = provider ;
152152 }
153+
154+ return this ;
153155 }
154156 }
155157}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ namespace SubSonic.Tests.DAL.SUT
1515{
1616 public class BaseTestFixture
1717 {
18- protected TestDbContext Context { get => SetUpSubSonic . DbContext ; }
18+ protected TestSubSonicContext Context { get => SetUpSubSonic . DbContext ; }
1919
2020 protected ISubSonicLogger Logger { get ; set ; }
2121
Original file line number Diff line number Diff line change 88
99namespace SubSonic . Tests . DAL . SUT
1010{
11- public class TestDbContext
11+ public class TestSubSonicContext
1212 : SubSonic . SubSonicContext
1313 {
14- public TestDbContext ( )
14+ public TestSubSonicContext ( )
1515 : base ( )
1616 {
1717
@@ -31,7 +31,7 @@ protected override void OnDbConfiguring(DbContextOptionsBuilder config)
3131 {
3232 config
3333 . ConfigureServiceCollection ( )
34- . AddLogging ( ( _config ) => _config . AddNUnitLogger < TestDbContext > ( LogLevel . Trace ) )
34+ . AddLogging ( ( _config ) => _config . AddNUnitLogger < TestSubSonicContext > ( LogLevel . Trace ) )
3535 . UseMockDbClient ( ( builder , options ) =>
3636 {
3737 builder
Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ namespace SubSonic.Tests.DAL
99 [ SetUpFixture ]
1010 public class SetUpSubSonic
1111 {
12- public static TestDbContext DbContext { get ; private set ; }
12+ public static TestSubSonicContext DbContext { get ; private set ; }
1313
1414 [ OneTimeSetUp ]
1515 public void OneTimeSetUp ( )
1616 {
17- DbContext = new TestDbContext ( ) ;
17+ DbContext = new TestSubSonicContext ( ) ;
1818 }
1919
2020 [ OneTimeTearDown ]
You can’t perform that action at this time.
0 commit comments