小编Bru*_*nri的帖子

Entity Framework Core 2.0 中每种类型的表

这些是我的模型:

public class Company
{
   public int CompanyId { get; set; }
   public string Name { get; set; }
   public string Address { get; set; }
   public string Email { get; set; }
   public string Url { get; set; }
   //...
}

public class HeadOffice : Company
{
   public int HeadOfficeId { get; set; }
   public virtual List<BranchOffice> BranchOffice { get; set; } = new List<BranchOffice>();
}

public class BranchOffice : Company
{
   public int BranchOfficeId { get; set; } …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework entity-framework-core

6
推荐指数
1
解决办法
9333
查看次数