public IEnumerable <Rent> Execute(AppDbContext context)
        {
            var movieRepository = new MovieRepository(context);

            if (!movieRepository.Exists(MovieId))
            {
                return(null);
            }

            return(movieRepository.GetRentsForMovie(MovieId));
        }
예제 #2
0
        public Movie Execute(AppDbContext context)
        {
            var repository = new MovieRepository(context);

            if (repository.Exists(Id))
            {
                return(repository.GetById(Id));
            }
            else
            {
                return(null);
            }
        }