Skip to content

Commit

Permalink
fix: MultiTenantDbContext.Create should have non nullable TenantInfo (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewTriesToCode authored Dec 14, 2024
1 parent 52495fb commit 9df0527
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9'
dotnet-version: |
8
9
- name: build
run: dotnet build
- name: test Finbuckle.MultiTenant
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nuget-push-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9'
dotnet-version: |
8
9
- name: Create the package
run: dotnet test -c Release -p:ContinuousIntegrationBuild=true && dotnet pack --no-build -c Release --output nupkgs
- name: Publish the package to NuGet.org
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-dryrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
node-version: 20
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9'
dotnet-version: |
8
9
- name: build and test
run: |
dotnet restore
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
node-version: 20
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9'
dotnet-version: |
8
9
- name: build and test
run: |
dotnet restore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class MultiTenantDbContext : DbContext, IMultiTenantDbContext
/// <typeparam name="TContext">The TContext implementation type.</typeparam>
/// <typeparam name="TTenantInfo">The ITenantInfo implementation type.</typeparam>
/// <returns></returns>
public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo)
public static TContext Create<TContext, TTenantInfo>(TTenantInfo tenantInfo)
where TContext : DbContext
where TTenantInfo : class, ITenantInfo, new()
=> Create<TContext, TTenantInfo>(tenantInfo, null);
Expand All @@ -41,7 +41,7 @@ public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo)
/// <typeparam name="TContext">The TContext implementation type.</typeparam>
/// <typeparam name="TTenantInfo">The ITenantInfo implementation type.</typeparam>
/// <returns></returns>
public static TContext Create<TContext, TTenantInfo>(TTenantInfo? tenantInfo, DbContextOptions? options)
public static TContext Create<TContext, TTenantInfo>(TTenantInfo tenantInfo, DbContextOptions? options)
where TContext : DbContext
where TTenantInfo : class, ITenantInfo, new()
{
Expand Down

0 comments on commit 9df0527

Please sign in to comment.