【发布时间】:2012-05-09 10:28:32
【问题描述】:
我有两张桌子
public class Table1
{
[Key]
int ID{get; set;}
Table2 table2{get; set;}
}
public class Table2
{
[Key]
int ID{get; set;}
int table1ID{get; set;}
//no instance of table i.e is relationship is uni-directional only
}
如何用 Table1.ID 和 Table2.table1ID 设置 table1 与 table2 的关系???
【问题讨论】:
标签: asp.net asp.net-mvc-3 entity-framework linq-to-entities ef-code-first