Tag: jointable

如何使用Entity Framework 7在代码中首先处理这两个模型?

问题 我正在编写将模拟库的概念ASP.NET 5 MVC6的certificate。 我正在使用CTP6和beta3。 如何使用代码优先方法在Entity Framework 7中定义它们的关系? 货架和书籍需要连接表。 在我看来,这个应用程序将一次考虑一个架子和自己的书籍。 换句话说,一个书架与书籍有一对多的关系。 楷模 货架型号: public class Shelf { public int ShelfId { get; set; } public string ShelfName { get; set; } public ShelfType MyProperty { get; set; } public virtual List Books { get; set; } public DateTime Created { get; set; } public string […]