0
对于简单的FK我可以通过使用实体框架代码第一逆属性生成列名
[ForeignKey("CustomList1")]
public int? CustomList1ID { get; set; }
public virtual CustomList CustomList1 { get; set; }
但inverseProperty更改生成列名(因为我有多个customList,如何控制对生成列名数据库?
[InverseProperty("CustomList1")]
public virtual List<Customer> CustomerCustomList1 { get; set; }
我知道ForeignKey(“CustomList1”)不会更改列名称,但下一行显式添加一个FK键会得到我需要的名称。 我也知道专栏(“myname”)将为简单的FK做,但对于InverseProperty它似乎不工作。 – neogeo 2012-04-20 17:40:40