Skip to content

Commit 9df0527

Browse files
authoredDec 14, 2024··
fix: MultiTenantDbContext.Create should have non nullable TenantInfo (#916)
1 parent 52495fb commit 9df0527

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed
 

‎.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
uses: actions/checkout@v4
1818
- uses: actions/setup-dotnet@v4
1919
with:
20-
dotnet-version: '9'
20+
dotnet-version: |
21+
8
22+
9
2123
- name: build
2224
run: dotnet build
2325
- name: test Finbuckle.MultiTenant

‎.github/workflows/nuget-push-public.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99
- uses: actions/checkout@v4
1010
- uses: actions/setup-dotnet@v4
1111
with:
12-
dotnet-version: '9'
12+
dotnet-version: |
13+
8
14+
9
1315
- name: Create the package
1416
run: dotnet test -c Release -p:ContinuousIntegrationBuild=true && dotnet pack --no-build -c Release --output nupkgs
1517
- name: Publish the package to NuGet.org

‎.github/workflows/release-dryrun.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ jobs:
1212
node-version: 20
1313
- uses: actions/setup-dotnet@v4
1414
with:
15-
dotnet-version: '9'
15+
dotnet-version: |
16+
8
17+
9
1618
- name: build and test
1719
run: |
1820
dotnet restore

‎.github/workflows/release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ jobs:
1212
node-version: 20
1313
- uses: actions/setup-dotnet@v4
1414
with:
15-
dotnet-version: '9'
15+
dotnet-version: |
16+
8
17+
9
1618
- name: build and test
1719
run: |
1820
dotnet restore

‎src/Finbuckle.MultiTenant.EntityFrameworkCore/MultiTenantDbContext.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public abstract class MultiTenantDbContext : DbContext, IMultiTenantDbContext
2828
/// <typeparam name="TContext">The TContext implementation type.</typeparam>
2929
/// <typeparam name="TTenantInfo">The ITenantInfo implementation type.</typeparam>
3030
/// <returns></returns>
31-
public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo)
31+
public static TContext Create<TContext, TTenantInfo>(TTenantInfo tenantInfo)
3232
where TContext : DbContext
3333
where TTenantInfo : class, ITenantInfo, new()
3434
=> Create<TContext, TTenantInfo>(tenantInfo, null);
@@ -41,7 +41,7 @@ public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo)
4141
/// <typeparam name="TContext">The TContext implementation type.</typeparam>
4242
/// <typeparam name="TTenantInfo">The ITenantInfo implementation type.</typeparam>
4343
/// <returns></returns>
44-
public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo, DbContextOptions? options)
44+
public static TContext Create<TContext, TTenantInfo>(TTenantInfo tenantInfo, DbContextOptions? options)
4545
where TContext : DbContext
4646
where TTenantInfo : class, ITenantInfo, new()
4747
{

0 commit comments

Comments
 (0)
Please sign in to comment.