public void UpdateUserRole(Entities.UserRoles userRoles) { UserRoles existing = context.UserRoles.Find(userRoles.ID); ((IObjectContextAdapter)context).ObjectContext.Detach(existing); context.Entry(userRoles).State = EntityState.Modified; }
public void AddUserRole(Entities.UserRoles userRoles) { context.UserRoles.Add(userRoles); }