예제 #1
0
 public List <T> GetListBy(Common.EfSearchModel.Model.QueryModel model, string prefix = "")
 {
     return(idal.GetListBy(model, prefix));
 }
예제 #2
0
 public IQueryable <T> LoadPagedList <TKey>(int pageIndex, int pageSize, ref int rowCount, System.Linq.Expressions.Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, System.Linq.Expressions.Expression <Func <T, TKey> > orderBy, bool isAsc = true, string orderfield = "", string prefix = "")
 {
     return(idal.LoadPagedList(pageIndex, pageSize, ref rowCount, whereLambda, model, orderBy, isAsc, orderfield, prefix));
 }
예제 #3
0
 public List <T> GetListBy <TKey>(Common.EfSearchModel.Model.QueryModel model, System.Linq.Expressions.Expression <Func <T, TKey> > orderLambda, bool isAsc = true, string orderfield = "", string prefix = "")
 {
     return(idal.GetListBy(model, orderLambda, isAsc, orderfield, prefix));
 }
예제 #4
0
 public List <T> GetListBy(System.Linq.Expressions.Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, string prefix = "")
 {
     return(idal.GetListBy(whereLambda, model, prefix));
 }
예제 #5
0
 public IQueryable <T> LoadListBy <TKey>(System.Linq.Expressions.Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, System.Linq.Expressions.Expression <Func <T, TKey> > orderLambda, bool isAsc = true, string orderfield = "", string prefix = "")
 {
     return(idal.LoadListBy(whereLambda, model, orderLambda, isAsc, orderfield, prefix));
 }
예제 #6
0
 public IQueryable <T> LoadListBy(Common.EfSearchModel.Model.QueryModel model, string prefix = "")
 {
     return(idal.LoadListBy(model, prefix));
 }
예제 #7
0
 public List <T> GetListBy(Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, string prefix = "")
 {
     return(LoadListBy(whereLambda, model, c => true, true, "", prefix).ToList());
 }
예제 #8
0
 public virtual IQueryable <T> LoadPagedList <TKey>(int pageIndex, int pageSize, ref int rowCount, Common.EfSearchModel.Model.QueryModel model, Expression <Func <T, TKey> > orderBy, bool isAsc = true, string prefix = "")
 {
     return(LoadPagedList(pageIndex, pageSize, ref rowCount, c => true, model, orderBy, isAsc, "", prefix));
 }
예제 #9
0
 public virtual IQueryable <T> LoadListBy(Common.EfSearchModel.Model.QueryModel model, string prefix = "")
 {
     return(LoadListBy(c => true, model, prefix));
 }
예제 #10
0
 public List <T> GetListBy <TKey>(Common.EfSearchModel.Model.QueryModel model, Expression <Func <T, TKey> > orderLambda, bool isAsc = true, string orderfield = "", string prefix = "")
 {
     return(LoadListBy(c => true, model, orderLambda, isAsc, orderfield, prefix).ToList());
 }
예제 #11
0
 public virtual IQueryable <T> LoadListBy(Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, string prefix = "")
 {
     return(LoadListBy(whereLambda, model, c => true, true, "", prefix));
 }
예제 #12
0
 public virtual IQueryable <T> LoadListBy <TKey>(Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, Expression <Func <T, TKey> > orderLambda, bool isAsc = true, string orderfield = "", string prefix = "")
 {
     if (!string.IsNullOrEmpty(orderfield))
     {
         return(db.Set <T>().Where(model, prefix).Where(whereLambda).OrderBy(orderfield, isAsc).AsQueryable());
     }
     if (isAsc)
     {
         return(db.Set <T>().Where(model, prefix).Where(whereLambda).OrderBy(orderLambda).AsQueryable());
     }
     else
     {
         return(db.Set <T>().Where(model, prefix).Where(whereLambda).OrderByDescending(orderLambda).AsQueryable());
     }
 }
예제 #13
0
 public List <T> GetPagedList <TKey>(int pageIndex, int pageSize, ref int rowCount, Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, Expression <Func <T, TKey> > orderBy, bool isAsc = true, string orderfield = "", string prefix = "")
 {
     return(LoadPagedList(pageIndex, pageSize, ref rowCount, whereLambda, model, orderBy, isAsc, orderfield, prefix).ToList());
 }
예제 #14
0
 public List <T> GetPagedList <TKey>(int pageIndex, int pageSize, ref int rowCount, Common.EfSearchModel.Model.QueryModel model, System.Linq.Expressions.Expression <Func <T, TKey> > orderBy, bool isAsc = true, string prefix = "")
 {
     return(LoadPagedList(pageIndex, pageSize, ref rowCount, model, orderBy, isAsc, prefix).ToList());
 }
예제 #15
0
 public List <T> GetListBy(Common.EfSearchModel.Model.QueryModel model, string prefix = "")
 {
     return(LoadListBy(c => true, model, prefix).ToList());
 }
예제 #16
0
 public List <T> GetPagedList <TKey>(int pageIndex, int pageSize, ref int rowCount, Common.EfSearchModel.Model.QueryModel model, string orderfield, bool isAsc = true, string prefix = "")
 {
     return(LoadPagedList(pageIndex, pageSize, ref rowCount, c => true, model, c => true, isAsc, orderfield, prefix).ToList());
 }
예제 #17
0
        public virtual IQueryable <T> LoadPagedList <TKey>(int pageIndex, int pageSize, ref int rowCount, Expression <Func <T, bool> > whereLambda, Common.EfSearchModel.Model.QueryModel model, Expression <Func <T, TKey> > orderBy, bool isAsc = true, string orderfield = "", string prefix = "")
        {
            rowCount = db.Set <T>().Where(whereLambda).Where(model, prefix).Count();

            if (!string.IsNullOrEmpty(orderfield))
            {
                return(db.Set <T>().Where(whereLambda).Where(model, prefix).OrderBy(orderfield, isAsc).Skip((pageIndex - 1) * pageSize).Take(pageSize).AsQueryable());
            }
            if (isAsc)
            {
                return(db.Set <T>().Where(whereLambda).Where(model, prefix).OrderBy(orderBy).Skip((pageIndex - 1) * pageSize).Take(pageSize).AsQueryable());
            }
            else
            {
                return(db.Set <T>().Where(whereLambda).Where(model, prefix).OrderBy(orderfield, isAsc).OrderByDescending(orderBy).Skip((pageIndex - 1) * pageSize).Take(pageSize).AsQueryable());
            }
        }