public void DeleteUserRole(UserRole userRole) { _databasecontext.UserRoles.Remove(userRole); _databasecontext.SaveChanges(); }
public void AddUserRole(UserRole userRole) { _databasecontext.UserRoles.Add(userRole); _databasecontext.SaveChanges(); }
public void AddUserRole(int UserId, int RoleId) { var userRole = new UserRole(); userRole.UserId = UserId; userRole.RoleId = RoleId; var userDa = new UserDa(databasecontext); userDa.AddUserRole(userRole); }