public ActionResult DeleteSave(int id) { Data dt = new Data(); dt.Id = id; db.Delete(dt); return(RedirectToAction("index")); }
public ActionResult DeleteSave(FormCollection collection) { try { long id = Convert.ToInt64(collection["Id"]); phones.Delete(id); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult DeleteSave(string record_id) { try { // TODO: Add delete logic here recordRepository.Delete(int.Parse(record_id)); return(RedirectToAction("Index")); } catch { return(View()); } }
public void Delete(int id) { phoneDictionary.Delete(id); }
public ActionResult DeleteSave(Phone phone) { phoneDictionary.Delete(phone.Id); return(RedirectToAction("Index")); }