Пример #1
0
 public static System.Collections.Generic.IList <Customer> GetPageByHQL(string hql, GenieLamp.Examples.QuickStart.Queries.DomainQueryParams hqlParams, int page = 0, int pageSize = 20)
 {
     return(Customer.GetByHQL(hql, hqlParams, page * pageSize, pageSize));
 }
Пример #2
0
 public static System.Collections.Generic.IList <Customer> GetByHQL(string hql, GenieLamp.Examples.QuickStart.Queries.DomainQueryParams hqlParams, int firstResult = 0, int maxResult = 100)
 {
     return(GenieLamp.Examples.QuickStart.Queries.QueryFactory.CreateQuery(hql, hqlParams)
            .SetFirstResult(firstResult < 0 ? 0 : firstResult)
            .SetMaxResults(maxResult < firstResult ? 100 : maxResult)
            .List <Customer>());
 }