示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public IActionResult GetVisionMovieList(GetMovieListVM model)
 {
     return(Ok(_blMovieRepository.GetVisionMovieList(model)));
 }
示例#4
0
        public IActionResult GetMovieList(GetMovieListVM model)
        {
            var a = _blMovieRepository.GetMovieList(model);

            return(Ok(_blMovieRepository.GetMovieList(model)));
        }