public ActionResult SearchResult(CustomerSearch request) { ICustomerDAL dal = new CustomerDAL(@"Data Source=.\SQLEXPRESS;Initial Catalog=DVDStore;Integrated Security=True"); IList <Customer> customers = dal.SearchForCustomers(request.Name, request.SortByColumn); request.Results = customers; return(View("Index", request)); }
public IActionResult SearchResult(CustomerSearch customerSearch) { IList <Customer> customers = customerDAL.SearchForCustomers(customerSearch.Name, customerSearch.SortMethod); return(View(customers)); }
public IActionResult Index() { CustomerSearch customerSearch = new CustomerSearch(); return(View(customerSearch)); }
public IActionResult CustomerSearchResult(CustomerSearch model) { var customers = dao.SearchForCustomers(model.Name, model.SortType); return(View(customers)); }
public IActionResult SearchResult(CustomerSearch model) { model.SearchResults = dal.SearchForCustomers(model.SearchString, model.SortString); return(View(model)); }