I have two related classes which share a common interface and are both stored in the same underlying database table. However, the Entity Framework generates one common class, wh
Is this data discriminated? i.e. does AccountType define which type it is? If so:
The account type then should completely disappear from the Account object (unmap it if not). To get just the UserAccount records, you use
.Accounts.OfType<UserAccount>()...
The Account class should probably be abstract in this model. The interface stuff can be added via a partial class - i.e. in a separate file, define:
partial class Account : IAccount {
// extra code here
}
etc
A reasonable walkthrough is here.