【发布时间】:2015-05-21 07:26:13
【问题描述】:
在我的 ios 应用程序中,我有许多模型类,如 ProjectLead、TeamLead、ProjectManager、Developer,所有这些类都扩展了 Employee 基类。
class Employee{
string name,age,company;
}
class ProjectLead: Employee{
string pl_1,pl_2,pl_3;
}
class TeamLead:Employee{
string tl_1,tl_2,tl_3;
}
class ProjectManager:Employee{
string pm_1,pm_2,pm_3;
}
class Developer:Employee{
string d_1,d_2,d_3;
}
我可以为我所有的 5 个模型类创建单独的实体。我是否需要为子实体提供父实体属性。如何在 EntityModel 中的实体定义中实现继承
for example Creating ProjectManager Entity
I can add pm_1,pm_2,pm_3 as its attributes, since its extends Employee I have another 3 attributes like name,aga,company. while creating ProjectManage entity Will i have to create it with 3 attributes or 6 attributes?
我只想为我的模型类创建实体,例如 http://www.raywenderlich.com/934/core-data-tutorial-for-ios-getting-started
【问题讨论】:
标签: ios entity-framework core-data