public IActionResult PutUser(string contactName, User user) //Update the user with the given contactName in the DB { try { _apprepository.Update(user); return(new JsonResult("ok")); } catch (Exception e) { Response.StatusCode = 505; throw new Exception(e.InnerException.Message); } }
public IActionResult PutReservation(int id, Reservation reservation) //Update the reservation in the DB { try { _apprepository.Update(reservation); return(new JsonResult("ok")); } catch (Exception e) { Response.StatusCode = 505; throw new Exception(e.InnerException.Message); } }