-
-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add MultiTenantDbContext.Create factory method BREAKING CHANGE: `MultiTenantDbContext` constructors accepting ITenantInfo removed, use `MultiTenantDbContext .Create` factory method instead
- Loading branch information
1 parent
ebf6d86
commit ea216ff
Showing
10 changed files
with
301 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Finbuckle.MultiTenant/Internal/StaticMultiTenantContextAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Finbuckle.MultiTenant.Abstractions; | ||
|
||
namespace Finbuckle.MultiTenant.Internal; | ||
|
||
internal class StaticMultiTenantContextAccessor<TTenantInfo>(TTenantInfo? tenantInfo) | ||
: IMultiTenantContextAccessor<TTenantInfo> | ||
where TTenantInfo : class, ITenantInfo, new() | ||
{ | ||
IMultiTenantContext IMultiTenantContextAccessor.MultiTenantContext => MultiTenantContext; | ||
|
||
public IMultiTenantContext<TTenantInfo> MultiTenantContext { get; } = | ||
new MultiTenantContext<TTenantInfo> { TenantInfo = tenantInfo }; | ||
} |
Oops, something went wrong.