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