public UserRoleCompany Update(UserRoleCompany userRoleCompanyChange) { var userRoleCompany = _context.UserRoleCompany.Attach(userRoleCompanyChange); userRoleCompany.State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); return(userRoleCompanyChange); }
public UserRoleCompany Delete(int id) { UserRoleCompany userRoleCompany = _context.UserRoleCompany.Find(id); if (userRoleCompany != null) { _context.UserRoleCompany.Remove(userRoleCompany); _context.SaveChanges(); } return(userRoleCompany); }
public UserRoleCompany Insert(UserRoleCompany userRoleCompany) { _context.UserRoleCompany.Add(userRoleCompany); _context.SaveChanges(); return(userRoleCompany); }