Skip to content

Commit deaea57

Browse files
committed
noticed that one of the DbContextOptionBuilder methods was a void.
1 parent a7f5c78 commit deaea57

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

SubSonic.Core.DataAccessLayer/src/Builders/DbContextOptionsBuilder.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

SubSonic.Tests/DAL/SUT/BaseTestFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

SubSonic.Tests/DAL/SUT/MochClassDefinitions/TestDbContext.cs renamed to SubSonic.Tests/DAL/SUT/MochClassDefinitions/TestSubSonicContext.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
namespace 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

SubSonic.Tests/DAL/SetUpSubSonicContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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]

0 commit comments

Comments
 (0)