1
Account.cs
如何使用C#代码映射映射一对多关系?
public IList<Alert> Alerts { get; set; }
Alert.cs
public Account Account { get; set; }
Bag<Alert>(x => x.Alerts, c => { }, r => { r.OneToMany(); });
并对警报侧
AlertMap.cs
ManyToOne(x => x.Account);
有人可以证实,这个映射是正确的?
您使用的可能会有所不同'Fluent'。如果不是,您使用哪个库进行映射? – rae1 2013-02-19 04:47:42
不使用流利。按代码映射。 – user1765862 2013-02-19 06:46:31