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