Ejemplo n.º 1
0
        public async Task <IDataResult <MovieListDto> > GetAll()
        {
            var movieList = await _movieDal.GetListAsync(null, m => m.Admin, m => m.Comments, m => m.Tags, m => m.Categories, m => m.Genres);

            if (movieList.Count > -1)
            {
                return(new SuccessDataResult <MovieListDto>(new MovieListDto
                {
                    Movies = movieList.ToList(),
                }, Messages.MovieList));
            }
            return(new ErrorDataResult <MovieListDto>());
        }