public IActionResult GetMovies([FromQuery] int page, [FromQuery] int pageSize, [FromQuery] String genreId, [FromQuery] String search)
 {
     try
     {
         List <Movies> moviesList;
         if (string.IsNullOrWhiteSpace(search))
         {
             if (string.IsNullOrWhiteSpace(genreId))
             {
                 moviesList = _movies.GetMovies(page, pageSize);
             }
             else
             {
                 moviesList = _movies.GetMoviesByGenre(page, pageSize, genreId);
             }
         }
         else
         {
             moviesList = _movies.SearchMovies(page, pageSize, search);
         }
         return(new JsonResult(new { StatusCodeResult = "200", movies = moviesList }));
     }
     catch (Exception)
     {
         return(new JsonResult(new { StatusCodeResult = "500", message = "Server error" }));
     }
 }