public ActionResult Show(SearchPage page, [IoCModelBinder(typeof(WebpageSearchQueryModelBinder))] WebpageSearchQuery model) { ViewData["webpageSearchQueryModel"] = model; ViewData["searchResults"] = _webpageSearchService.Search(model); return(View(page)); }
public IPagedList <Webpage> Search(WebpageSearchQuery searchQuery) { IQueryOver <Webpage, Webpage> query = _session.QueryOver <Webpage>().Where(x => x.Parent.Id == searchQuery.ParentId); if (!string.IsNullOrWhiteSpace(searchQuery.Query)) { query = query.Where(x => x.Name.IsInsensitiveLike(searchQuery.Query, MatchMode.Anywhere)); } return(query.Paged(searchQuery.Page)); }
public ActionResult Show(SearchPage page, [IoCModelBinder(typeof(WebpageSearchQueryModelBinder))] WebpageSearchQuery model) { ViewData["webpageSearchQueryModel"] = model; if (string.IsNullOrWhiteSpace(model.Term)) { return(View(page)); } ViewData["searchResults"] = _webpageSearchService.Search(model); return(View(page)); }
public PartialViewResult Results(WebpageSearchQuery searchQuery) { ViewData["results"] = _webpageAdminSearchService.Search(searchQuery); return(PartialView(searchQuery)); }
public ViewResult Search(WebpageSearchQuery searchQuery) { return(View(searchQuery)); }
public IPagedList <Webpage> Search(WebpageSearchQuery model) { return(_documentSearcher.Search(model.GetQuery(), model.Page)); }