public ActionResult Delete(Int32?Stateid) { using (StatesCtl db = new StatesCtl()){ db.delete(Stateid); return(RedirectToAction("Index")); } }
public ActionResult EditTableRowDelete(Int32?Stateid) { using (StatesCtl db = new StatesCtl()){ db.delete(Stateid); return(RedirectToAction("EditTable")); } }
public ActionResult EditTableRowsDelete(string records) { using (StatesCtl db = new StatesCtl()){ foreach (string id in records.Trim(',').Split(',')) { if (!string.IsNullOrEmpty(id.Trim())) { db.delete(Convert.ToInt32(id)); } } return(View()); } }