Exemple #1
0
        public async Task <IActionResult> OnPostAddRestaurant()
        {
            try
            {
                string cs = _config.GetConnectionString("Default");

                fd.RestaurantWatched(cs, Convert.ToInt32(Request.Form["RestaurantID"]));

                //return RedirectToPage("./Index", new { @redirect = "Whendupe", @value = Request.Form["NewWhen.WhenText"].ToString() });

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