0
OriAssurant created
Hi Support,
I was trying to add an OrganizationUnitType column to AbpOrganizationUnits table, I created OrganizationUnitExtension class inherited from OrganizationUnit:
public class OrganizationUnitExtension : OrganizationUnit
{
public short OrganizationUnitTypeId { get; set; }
public OrganizationUnitExtension(int? tenantId, string displayName, short organizationUnitTypeId, long? parentId = null) : base(tenantId, displayName, parentId)
{
OrganizationUnitTypeId = organizationUnitTypeId;
}
}
And add following line to PostInitialize method of the CoreModule.cs:
Configuration.ReplaceService<OrganizationUnit, OrganizationUnitExtension>(DependencyLifeStyle.Transient);
but seems the there are a lot more dependencies on this table, no matter input/output dtos or dataset.
Is there a better way to modify the table? Could we use RAD tool?
Thank you,
1 Answer(s)
-
0
hi oriassurant
Please refer to the Extending Existing Entities documentation. https://docs.aspnetzero.com/documents/aspnet-core-angular/latest/Extending-Existing-Entities-Core-Angular