public IActionResult CreateCinemaRoom([FromBody] CinemaRoomInfo cinemaRoom, int cinemaId) { ResultCreated result = сinemaService.CreateCinemaRoom(cinemaId, cinemaRoom); if (result.ResultOk) { return(Created($"api/cinemas/{cinemaId}/cinemaRooms/{result.Id}", typeof(CinemaRoom))); } return(BadRequest(result)); }
public IActionResult CreateCinema([FromBody] CinemaInfo cinemaInfo) { ResultCreated result = сinemaService.CreateCinema(cinemaInfo); if (result.ResultOk) { return(Created($"api/cinemas/{result.Id}", typeof(Cinema))); } return(BadRequest(result)); }
public IActionResult CreateFilm([FromBody] FilmInfo filmInfo) { ResultCreated result = filmService.CreateFilm(filmInfo); if (result.ResultOk) { return(Created($"api/films/{result.Id}", typeof(Film))); } return(BadRequest(result)); }
public IActionResult CreateSession([FromBody] SessionInfo sessionInfo) { ResultCreated result = sessionService.CreateSession(sessionInfo); if (result.ResultOk) { return(Created($"api/sessions/{result.Id}", typeof(Session))); } return(BadRequest(result)); }
public IActionResult CreateOrder([FromBody] OrderInfo order) { ResultCreated result = orderService.CreateOrder(order); if (result.ResultOk) { return(Created($"api/orders/{result.Id}", typeof(Order))); } return(BadRequest(result)); }