I m trying to create a Friend relationship for my User table for my site. I m using MVC3 and EF4.1. Here is what I have so far (non-working). Any advice and suggestions is greatly appreciated!
Thanks!
public class User{
public int UserID {get;set;}
public string Email {get;set;}
public string Password {get;set;}
public virtual ICollection<User> Buddies {get;set;}
}
/* mapping table for user to user friendships */
public class Friendship{
public int UserID {get;set;}
public int BuddyID {get;set;}
}