如何为 EF 构建这些表?
第一张表:
public class model1
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
第二张表:
public class model2
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
具有第一个和第二个以及几个字段的连接的表:
public class model3
{
public int (id from model1){ get; set; }
public int (id from model2) { get; set; }
public int (id from model2){ get; set; }
public decimal Name{ get; set; }
public decimal Description{ get; set; }
}