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