예제 #1
0
        public IActionResult OnGet(int id)
        {
            var model = this.service.GetMovie(id);

            if (model == null)
            {
                return(RedirectToPage("./Index"));
            }

            this.Movie = new MovieInputModel
            {
                Id          = model.Id,
                Title       = model.Title,
                ReleaseYear = model.ReleaseYear,
                Summary     = model.Summary
            };
            return(Page());
        }
 public void OnGet()
 {
     this.Movie = new MovieInputModel();
 }