public IPagedList <ETag> Search(ETagSearchQuery query)
        {
            IQueryOver <ETag, ETag> queryOver = _session.QueryOver <ETag>();

            if (!string.IsNullOrWhiteSpace(query.Name))
            {
                queryOver = queryOver.Where(eTag => eTag.Name.IsInsensitiveLike(query.Name, MatchMode.Anywhere));
            }

            return(queryOver.OrderBy(eTag => eTag.Name).Asc.Paged(query.Page));
        }
Beispiel #2
0
 public ViewResult Index(ETagSearchQuery searchQuery)
 {
     ViewData["results"] = _eTagAdminService.Search(searchQuery);
     return(View(searchQuery));
 }