public ActionResult Delete(int Id, FormCollection collection) { try { // TODO: Add delete logic here db.deleteModel(Id); db.Remove(Id); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult delete(int id) { obj.deleteModel(id); obj.save(); return(RedirectToAction("Index")); }