// GET: Admin/Contact public ActionResult Index(string searchString = null) { List <Contact> contacts; if (string.IsNullOrEmpty(searchString)) { contacts = contactDAO.GetAll(); } else { contacts = contactDAO.Search(searchString); } return(View(contacts)); }