Account.cs
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);
有人可以确认这个映射是正确的吗?
Account.cs
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);
有人可以确认这个映射是正确的吗?
Inverse()
设置onetomany 映射Bag(x => x.Alerts, c => { c.Inverse(); c.Key("account_id"); }, r => { r.OneToMany();
});
ManyToOne(x => x.Account, c => c.Column("account_id"));
笔记: