Пример #1
0
        public async Task <IActionResult> GetCinema([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var cinemas = await Task.Run(() => _cinemaService.GetCinemasId(id));

            if (cinemas == null)
            {
                return(NotFound());
            }

            return(Ok(cinemas));
        }