-
Notifications
You must be signed in to change notification settings - Fork 865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
模型是否支持继承 #612
Labels
bug
Something isn't working
Comments
在6.4.7中我测试可以支持EF的TPT模式,也就是Company建表子表外键指向Company分别建立Manager和Worker,只需要在基类指定下Table的名称,并且在子类也指定Table名称就可以实现继承关系,然后DataContext分别构建DbSet。 [Table("SpaceBasics")]
public class SpaceBasic : BasePoco
{
[Display(Name = "名称")]
public string Name { get; set; }
}
[Table("Seats")]
public class Seat : SpaceBasic
{
} public DbSet<SpaceBasic> SpaceBasics { get; set; }
public DbSet<Seat> Seats { get; set; }
public DbSet<Area> Areas { get; set; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问 模型是否支持继承,例如 company->list abstract employee 下面有2种类型 manager, worker,
The text was updated successfully, but these errors were encountered: