Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public IActionResult GetVisionMovieList(GetMovieListVM model)
 {
     return(Ok(_blMovieRepository.GetVisionMovieList(model)));
 }
Ejemplo n.º 4
0
        public IActionResult GetMovieList(GetMovieListVM model)
        {
            var a = _blMovieRepository.GetMovieList(model);

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