public List <GetMovieListVM> GetMovieList(GetMovieListVM model) { var result = GetAllWithType <GetMovieListVM>(); if (!string.IsNullOrEmpty(model.Name)) { result = result.Where(y => y.Name.ToUpper().Contains(model.Name.ToUpper())).ToList(); } if (!string.IsNullOrEmpty(model.Genre)) { result = result.Where(y => y.Genre.ToUpper().Contains(model.Genre.ToUpper())).ToList(); } return(result); }
public List <GetMovieListVM> GetVisionMovieList(GetMovieListVM model) { var result = GetAllWithType <GetMovieListVM>().Where(p => _context.Set <VisionMovie>().ToList().Any(p2 => p2.MovieId == p.Id)).ToList(); if (!string.IsNullOrEmpty(model.Name)) { result = GetAllWithType <GetMovieListVM>().Where(p => _context.Set <VisionMovie>().ToList().Any(p2 => p2.MovieId == p.Id)).ToList().Where(y => y.Name.ToUpper().Contains(model.Name.ToUpper())).ToList(); } if (!string.IsNullOrEmpty(model.Genre)) { result = GetAllWithType <GetMovieListVM>().Where(p => _context.Set <VisionMovie>().ToList().Any(p2 => p2.MovieId == p.Id)).ToList().Where(y => y.Genre.ToUpper().Contains(model.Genre.ToUpper())).ToList(); } return(result); }
public IActionResult GetVisionMovieList(GetMovieListVM model) { return(Ok(_blMovieRepository.GetVisionMovieList(model))); }
public IActionResult GetMovieList(GetMovieListVM model) { var a = _blMovieRepository.GetMovieList(model); return(Ok(_blMovieRepository.GetMovieList(model))); }