コード例 #1
0
 public void OnGet()
 {
     this.Movies = service.GetMovies()
                   .Select(item => new MovieOutputModel
     {
         Id          = item.Id,
         Title       = item.Title,
         ReleaseYear = item.ReleaseYear,
         Summary     = item.Summary,
         LastReadAt  = DateTime.Now
     })
                   .ToList();
 }
コード例 #2
0
        public IActionResult Get()
        {
            var movies = service.GetMovies();

            return(Ok(ToOutputMovie(movies)));
        }