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);
     }
 }
Пример #2
0
 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);
     }
 }