Hello I'm reading something in a document on extending existing entities and objects. It says since Tenant, User, and Role are abstract classes we can add new properties on them. While other classes like Edition it's not abstract then we need to create a new class and inherit from Edition class.
Any is that? Maybe something is missing in here. I'm not getting it.
6 Answer(s)
-
0
Hi,
Actually it means like this. Since AbpTenant class is abstract, we are crated a new class called Tenant in AspNet Zero project, see <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Core/MultiTenancy/Tenant.cs">https://github.com/aspnetzero/aspnet-ze ... /Tenant.cs</a>.
So you can directly add your new fields in this class but for other classes like Edition, you need to create a new entity in AspNet Zero to add new fields.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks for the explanation but still I don't understand why can't I add properties to Edition class directly?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
Because this class is defined in Abp.Zero.Common nuget package.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Can you explain more pls :-)
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
This is a software design process with EF. Following articles could help to understand. <a class="postlink" href="https://weblogs.asp.net/manavi/inheritance-mapping-strategies-with-entity-framework-code-first-ctp5-part-1-table-per-hierarchy-tph">https://weblogs.asp.net/manavi/inherita ... rarchy-tph</a>
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks I'll read on.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)