Hi i have the following code
public void allocateUserRole(CommonDB.user user, CommonDB.role role)
{
user.roles.Add(role);
this.Entities.SaveChanges();
}
It is giving me the following error because i am trying to insert the userRoles. Where tblUser haas an intermediary table with tblRole
**
The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects.**