Exemple #1
0
        public async Task <IActionResult> OnPost()
        {
            try
            {
                if (ModelState.IsValid == false)
                {
                    return(Page());
                }
                string cs = _config.GetConnectionString("Default");
                fd.UpdateFilm(cs, UpdateFilmDetails);

                return(RedirectToPage("./View", new { @Id = UpdateFilmDetails.FilmID, @redirect = "update" }));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
        }