Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: MultiTenantDbContext.Create should have non nullable TenantInfo #916

Merged
merged 2 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading