public async Task <IActionResult> PutHolidayOwner(int id, HolidayOwner hOwner) { if (id != hOwner.Id) { return(BadRequest()); } _context.Entry(hOwner).State = EntityState.Modified; await _context.SaveChangesAsync(); return(Ok()); }
public ActionResult EditHolidayConfirmed(Holidays holidays) { dbHoli.Entry(holidays).State = EntityState.Modified; dbHoli.SaveChanges(); return(RedirectToAction("Holidays")); }