Exemplo n.º 1
0
        public async Task<IActionResult> OnPostAddFilm()
        {
            try
            {
                string cs = _config.GetConnectionString("Default");

                fd.FilmWatched(cs, Convert.ToInt32(Request.Form["FilmID"]));

                //return RedirectToPage("./Index", new { @redirect = "directordupe", @value = Request.Form["NewDirector.DirectorText"].ToString() });

                return RedirectToPage("./Index", new { @redirect = "FilmWatched" });
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
        }