-
-
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: added MultiTenantDbContext.Create() and tests
BREAKING CHANGE: MultiTenantDbContext constructors accepting ITenantInfo removed, use Create factory instead
- Loading branch information
1 parent
ebf6d86
commit 00dc5c4
Showing
9 changed files
with
215 additions
and
145 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
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 }; | ||
} |
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
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
Oops, something went wrong.