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());
        }
예제 #2
0
 public ActionResult EditHolidayConfirmed(Holidays holidays)
 {
     dbHoli.Entry(holidays).State = EntityState.Modified;
     dbHoli.SaveChanges();
     return(RedirectToAction("Holidays"));
 }