Beispiel #1
0
        protected PaginatedList <T> PaginatedSelect <T>(QueryCondition conditions, string orderByColumn,
                                                        int start, int count, Orm.Orm.OrderType orderType = Orm.Orm.OrderType.Asc) where T : new()
        {
            var q = Orm.Orm.PaginationSelect <T>(conditions, orderByColumn, orderType, start, count);

            return(ReadPaginatedResult(q, start, count, x => x.ReadList <T>()));
        }
Beispiel #2
0
        protected PaginatedList <T> PaginatedSelect <T>(DbQuery innerSelect, string orderByColumn, int start, int count,
                                                        Orm.Orm.OrderType orderType = Orm.Orm.OrderType.Asc, bool complexResult = false) where T : new()
        {
            var q = Orm.Orm.PaginationSelect(innerSelect, orderByColumn, orderType, start, count);

            return(ReadPaginatedResult(q, start, count, x => x.ReadList <T>(complexResult)));
        }
Beispiel #3
0
 public virtual PaginatedList <TEntity> GetPage(int start, int count, string orderBy = null, Orm.Orm.OrderType orderType = Orm.Orm.OrderType.Asc)
 {
     if (string.IsNullOrEmpty(orderBy))
     {
         orderBy = Orm.Orm.GetPrimaryKeyFields(typeof(TEntity)).First().Name;
     }
     return(PaginatedSelect <TEntity>(orderBy, start, count, orderType));
 }
Beispiel #4
0
        protected PaginatedList <T> PaginatedSelect <T>(string orderByColumn, int start, int count, Orm.Orm.OrderType orderType = Orm.Orm.OrderType.Asc) where T : new()
        {
            var conds = new AndQueryCondition();

            return(PaginatedSelect <T>(conds, orderByColumn, start, count, orderType));
        }