Beispiel #1
0
        public ActionResult Delete(int id)
        {
            var db = new PeopleDb(@"Data Source=.\sqlexpress;Initial Catalog=Food;Integrated Security=True");

            db.Delete(id);
            return(RedirectToAction("Index"));
        }
        public IActionResult Delete(int id)
        {
            PeopleDb db = new PeopleDb(_connectionString);

            db.Delete(id);
            return(Redirect("/postdemo/showpeople"));
        }
Beispiel #3
0
        public ActionResult Delete(int id)
        {
            PeopleDb db = new PeopleDb(_connectionString);

            db.Delete(id);
            return(Redirect("/people/index"));
        }
Beispiel #4
0
        public IActionResult Delete(int id)
        {
            var db = new PeopleDb(_connectionString);

            db.Delete(id);
            return(Json(id));
        }
Beispiel #5
0
        public ActionResult Delete(int pid)
        {
            var db = new PeopleDb(ConfigurationManager.ConnectionStrings["MvcApplication2.Properties.Settings.PeopleConStr"].ConnectionString);

            db.Delete(pid);
            return(RedirectToAction("Index"));
        }
Beispiel #6
0
 public ActionResult Delete(int pid)
 {
     var db = new PeopleDb(ConfigurationManager.ConnectionStrings["MvcApplication2.Properties.Settings.PeopleConStr"].ConnectionString);
     db.Delete(pid);
     return RedirectToAction("Index");
 }