// GET: Home public ActionResult Index() { var database = new FakeContactsDatabase(); var contacts = database.GetAll(); return View(contacts); }
public ActionResult DeleteContact() { int contactID = int.Parse(Request.Form["ContactID"]); var database = new FakeContactsDatabase(); database.Delete(contactID); var contacts = database.GetAll(); return View("Index",contacts); }