How to Change Default Tenancy Name while migration?
Please help me on that.
7 Answer(s)
-
0
Hi,
You can change it in CreateDefaultTenant method of DefaultTenantBuilder class. But this only changes it for migration and probably, you will have some other problems.
Instead of that, please add below constant to Tenant class.
public new const string DefaultTenantName = "NewDefaultTenantName";Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
<cite>ismcagdas: </cite> Hi,
You can change it in CreateDefaultTenant method of DefaultTenantBuilder class. But this only changes it for migration and probably, you will have some other problems.
Instead of that, please add below constant to Tenant class.
public new const string DefaultTenantName = "NewDefaultTenantName";Please confirm the file Name.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
It is Tenant.cs file in MultiTenancy folder of your *.Core project.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
<cite>ismcagdas: </cite> Hi,
It is Tenant.cs file in MultiTenancy folder of your *.Core project.
This is Tenant file. Where to add in this?
public class Tenant : AbpTenant<User> { //Can add application specific tenant properties here
protected Tenant() { } public Tenant(string tenancyName, string name) : base(tenancyName, name) { } }Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
Below this line,
//Can add application specific tenant properties hereMarkdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Is it Correct? I can't understand. How it assign as default tanant? Please explain...
public class Tenant : AbpTenant<User> { //Can add application specific tenant properties here
public new const string DefaultTenantName = "NewDefaultTenantName";
protected Tenant() {
}
public Tenant(string tenancyName, string name) : base(tenancyName, name) {
} }
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
It is used in DefaultTenantBuilder when seeding database here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/master/src/MyCompanyName.AbpZeroTemplate.EntityFramework/Migrations/Seed/Tenants/DefaultTenantBuilder.cs#L25">https://github.com/aspnetzero/aspnet-ze ... der.cs#L25</a>.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)