【发布时间】:2011-06-16 19:50:55
【问题描述】:
我的应用应该有 Medics 和 Participants。
他们都应该能够登录网站。
所以,我现在拥有的是这个。
public class Participant:Person
{
public string EmergencyContactNumber;
}
public class Medic:Person
{
public string MedicHospitalId;
}
public abstract class Person
{
public string FirstName;
public string LastName;
public string UserName; //this is the Membership Provider UserName to associate the MembershipUser to the Person thats logging into to the system.
}
问题在于医生最终也可能成为参与者......我不想为此创建一个新用户...... 如何更改我的模型以允许此功能?
【问题讨论】:
标签: asp.net-mvc entity-framework asp.net-mvc-3 inheritance ef-code-first