public ActionResult Delete(int id) { var _db = new ContactBUS().GetContacts(); var contact = new ContactBUS().GetContact(id); _db.Remove(contact); return RedirectToAction("List"); }
public ActionResult Delete(int id, string prefix) { var _db = new ContactBUS().GetContacts(); var contact = new ContactBUS().GetContact(id); _db.Remove(contact); return RedirectToAction("List", new { id = contact.Id, prefix }); }