Ejemplo n.º 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"));
        }
Ejemplo n.º 2
0
        public IActionResult Delete(int id)
        {
            PeopleDb db = new PeopleDb(_connectionString);

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

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

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

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