首先创建代码,从多到多,并在关联表中添加其他字段我有这样的设想:public class Member{
public int MemberID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public virtual ICollection<Comment> Comments { get; set; }}public class Comment{
public int CommentID { get; set; }
public string Message { get; set; }
public virtual ICollection<Member> Members { get; set; }}public class MemberComment{
public int MemberID { get; set; }
public int CommentID { get; set; }
public int Something { get; set; }
public string SomethingElse { get; set; }}如何配置我的关联FLUENT API?还是有更好的方法来创建关联表?
3 回答
- 3 回答
- 0 关注
- 653 浏览
添加回答
举报
0/150
提交
取消