2
考慮這個Poco
:多對多自加入實體框架代碼優先
public class User
{
public int Id { get; set; }
public string Username { get; set; }
public string Fullname { get; set; }
}
現在我要實現的後續技術,其中用戶可以跟隨其他用戶,以便基本上自身多對多的關係
問題是我不知道我究竟能在Entity Framework
Code-First
中實現?
我想到了一個鏈接表:
public class UserFollow
{
public int Id { get; set; }
public int Follower { get; set; }
public int Following { get; set; }
public DateTime FollowDate { get; set; }
}
我希望能夠得到所有的關注,並從每個用戶對象繼?
這是怎麼寫在配置文件? – 2012-01-06 10:35:02