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