public IActionResult PostReservation(Reservation reservation) //Insert the reservation in the DB { try { _apprepository.Add(reservation); return(new JsonResult("ok")); } catch (Exception e) { Response.StatusCode = 505; throw new Exception(e.InnerException.Message); } }
public IActionResult PostUser(User user) //Insert the new user in the DB { try { _apprepository.Add(user); return(new JsonResult("ok")); } catch (Exception e) { Response.StatusCode = 505; throw new Exception(e.InnerException.Message); } }