public ActionResult <int> Post([FromBody] reservationRestaurant resAux) { try{ Restaurant_res reserva = new Restaurant_res(resAux.fecha_res, resAux.cant_people, resAux.date, resAux.user_id, resAux.rest_id); AddResRestaurantCommand command = CommandFactory.AddResRestaurantCommand(reserva); command.Execute(); // var id = ResRestaurantRepository.addReservation(reserva); //Console.WriteLine(id); return(Ok()); } catch (DatabaseException) { Console.WriteLine("Estoy en el databaseException"); return(StatusCode(500)); } catch (InvalidStoredProcedureSignatureException) { Console.WriteLine("Estoy en el InvalidStoredProcedureSignatureException"); return(StatusCode(500)); } catch (AvailabilityException e) { ErrorMessage errorMessage = new ErrorMessage(e.Message); return(BadRequest(errorMessage)); } }