示例#1
0
 public IList <ReviewModelDTO> GetReviews(int movieId)
 {
     using (IMovieDataSource _ds = new MovieDataSource(new MovieDbContext()))
     {
         IList <ReviewModel> result = _ds.GetReviews(movieId).ToList();
         return(result.Select(r => new ReviewModelDTO()
         {
             Id = r.Id,
             Rating = r.Rating,
             Reviewer = r.Reviewer,
             ReviewText = r.ReviewText,
             Summary = r.Summary
         }).ToList());
     }
 }