public IEnumerable <Rent> Execute(AppDbContext context) { var movieRepository = new MovieRepository(context); if (!movieRepository.Exists(MovieId)) { return(null); } return(movieRepository.GetRentsForMovie(MovieId)); }
public Movie Execute(AppDbContext context) { var repository = new MovieRepository(context); if (repository.Exists(Id)) { return(repository.GetById(Id)); } else { return(null); } }