コード例 #1
0
        public ActionResult Delete(int id)
        {
            var _db = new ContactBUS().GetContacts();
            var contact = new ContactBUS().GetContact(id);

            _db.Remove(contact);
            return RedirectToAction("List");
        }
コード例 #2
0
 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 });
 }