Craig is right because the usrgrp
table has only 2 FKs, it is a pure join table, and as such the Entity Framework interprets this as a ManyToMany association.
As the code samples Craig has above illustrate this is usually fine for most customers.
If however you want to independently manage the UserGroup relationship one option is to add an extra column to the usrgrp table, an Identity Column is probably easiest. The Entity Framework can then no longer collapse this table into just navigations, so you will see an Entity for the usrgrp table that you can manipulate independently.
i.e.
someUser.UserGroups.Add(new UserGroup {User = someUser, Group = someGroup});
Notice you don't have to specify the Identity column (which would be a pain) because it is store generated.
Generally most customers prefer not to see an Entity for pure join tables, because the programming experience is simplier without it. For example LINQ queries become a little more complicated:
this:
var users = from g in ctx.Groups
from u in g.Users
where g.Name == "Administrators"
select u;
becomes:
var users = from g in ctx.Groups
from ug in g.UserGroups
where g.Name == "Administrators"
select ug.User;
Hope this extra clarification helps
Alex