Dunno how to name this properly. I have two entities in m:n relationship: Member and Role.
public class Role
{
public int Id { get; set; }
public string Title { get; set; }
public ICollection<Member> MembersInRole { get; set; }
}
public class Member
{
public int Id { get; set; }
public string Name { get; set; }
public string Password { get; set; }
public string Email { get; set; }
public ICollection<Role> Roles { get; set; }
}
I have made some seed data:
http://i56.tinypic.com/2vjvj1w.png
The problem is, that my Member entity has no roles assigned, even when I created them in context (as you can see at images). I don't know what's wrong. Tables in database seems to be ok. I am not sure if there isn't something wrong with context instances. But it should be ok, becuase I am working with seed data all the time.