Entity Framework 4.1 Code First Self-Referencing One-to-Many and Many-to-Many Associations
问题 I have a User that can have collection of users he likes... Another user can have collection of users he likes.... If User A likes User B and if User B likes User A, then they get to hang out. I need to send each other their contact info. How do we represent such a model in Entity Framework Code First? public class User { public int UserId { get; set; } public int? UserLikeId { get; set; } public virtual UserLike UserLike { get; set; } } public class UserLike { public int UserLikeId { get;