Exemple #1
0
 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());
     }
 }
Exemple #2
0
 public IEnumerable <Cinemas> GetCinemas()
 {
     return(_cinemaService.GetCinemas());
 }
        public IActionResult GetCinemas()
        {
            var cinemas = _сinemaService.GetCinemas();

            return(Ok(new GetResponse <IEnumerable <CinemaView> >(cinemas)));
        }