public IHttpActionResult GetMovies(string key) { if (Startup.key != key) { return(BadRequest("Incorrect key")); } System.Console.WriteLine("GET cinemas"); try { var cinemas = _ICinemaService.GetCinemas(); return(Ok(new { results = cinemas })); } catch (System.Exception) { return(InternalServerError()); } }
public IEnumerable <Cinemas> GetCinemas() { return(_cinemaService.GetCinemas()); }
public IActionResult GetCinemas() { var cinemas = _сinemaService.GetCinemas(); return(Ok(new GetResponse <IEnumerable <CinemaView> >(cinemas))); }