- ABP Framework version: v7.3.4
- UI Type: Blazor Server
- Database System: EF Core (SQL Server
-
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
we add this code to all configuresservices
Configure<AbpMultiTenancyOptions>(options =>
{
options.IsEnabled = MultiTenancyConsts.IsEnabled;
});
and we Replace Services MultiTenantConnectionStringResolver with https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs
and we add connection string to tenant configuration(Test Tenant)
But we login with test tenant with special connection string but abp loaded to grid with data to default connection(Host) string database
MultiTenant ConnectionString property doesn't work.
8 Answer(s)
-
0
Can you share a test project? I will check it.
My email is shiwei.liang@volosoft.com
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Of course I sent MultitenantTest.rar via We transfer.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
We want to Multi tenant project only database level not table level.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
The Deneme entity have to implement
IMultiTenantinterface.This is a convention, otherwise, the APB framework will use it as a host entity
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
But we already use different db by tenant. why do we implement entity IMultiTenant interface
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Yes, this is a design. Suppose you want to create an entity as a host entity,, what should you do. Some tenants use separate databases, and some tenants use shared databases., How to filter the data.
IMultiTenantinterface is an identifier used to indicate that the entity is a multi-tenant entity, It is designed for the above scenarios.Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
How can We change from tenantId (Guid) to KurumId(int). We must use exist old mssql db.(db first)
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
How can We change from tenantId (Guid) to KurumId(int).
Sorry, it's not possible. see: https://github.com/abpframework/abp/issues/1704#issuecomment-527372545
You can consider to add a new property type as KurumId(int), then use it as your business primary key:
ObjectExtensionManager.Instance .MapEfCoreProperty<Tenant, int>( "KurumId", (entityBuilder, propertyBuilder) => { propertyBuilder.HasIndex() .IsUnique(); } );Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

