public List <VisionMovieListVM> GetVisionMovieList(VisionMovieGetVM model) { var movies = GetAllWithType <VisionMovieListVM>(); if (model.MovieId.HasValue) { movies = movies.Where(y => y.MovieId == model.MovieId).ToList(); } if (model.MovieHouseId.HasValue) { movies = movies.Where(y => y.MovieHouseId == model.MovieHouseId).ToList(); } if (model.SessionId.HasValue) { movies = movies.Where(y => y.SessionId == model.SessionId).ToList(); } if (!String.IsNullOrEmpty(model.DisplayDate)) { movies = movies.Where(y => (y.DisplayDate).ToShortDateString() == DateTime.Parse(model.DisplayDate).ToShortDateString()).ToList(); } return(movies); }
public IActionResult GetVisionMovieList(VisionMovieGetVM model) { return(Ok(_blVisionMovieRepository.GetVisionMovieList(model))); }