public IActionResult OnGet(int?videoId) { Genres = _helper.GetEnumSelectList <MovieGenre>(); Video = videoId.HasValue ? _videoData.GetVideo(videoId.Value) : new Video { ReleaseDate = DateTime.Now.Date }; return(Video == null?RedirectToPage("./VideoError", new { message = "The video does not exist" }) : (IActionResult)Page()); }
public IActionResult OnGet(int videoId) { Video = _videoData.GetVideo(videoId); return(Video == null?RedirectToPage("./VideoError", new { message = "The video does not exist" }) : (IActionResult)Page()); }