Beispiel #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());
        }
Beispiel #2
0
 public void OnGet()
 {
     this.Movie = new MovieInputModel();
 }