예제 #1
0
 public IQueryable <TEntity> GetByQuery(
     Expression <Func <TEntity, bool> > predicate,
     string FieldSort,
     bool FieldOption)
 {
     return(BaseDA <TEntity, TId> .Sort <TEntity>(((IQueryable <TEntity>) this.dbSet).Where <TEntity>(predicate), FieldSort, FieldOption, ref this.TotalRecord));
 }
예제 #2
0
        //public virtual TEntity GetById(TId id, string propertyName)//temp
        //{
        //    ParameterExpression parameterExpression;
        //    return ((IQueryable<TEntity>)this.dbSet).Where<TEntity>(Expression.Lambda<Func<TEntity, bool>>((Expression)Expression.Equal((Expression)Expression.Property((Expression)parameterExpression, propertyName), (Expression)Expression.Constant((object)id)), parameterExpression)).SingleOrDefault<TEntity>();
        //}

        public IQueryable <TEntity> GetPaging(
            string FieldSort,
            bool FieldOption,
            int RowPerPage,
            int CurrentPage,
            string Keyword,
            List <string> SearchInField)
        {
            return(BaseDA <TEntity, TId> .SortPaging <TEntity>((IQueryable <TEntity>) this.dbSet, FieldSort, FieldOption, RowPerPage, CurrentPage, Keyword, SearchInField, ref this.TotalRecord));
        }
예제 #3
0
 public virtual IQueryable <TEntity> GetPaging(
     Expression <Func <TEntity, bool> > predicate,
     string FieldSort,
     bool FieldOption,
     int RowPerPage,
     int CurrentPage,
     string Keyword,
     List <string> SearchInField)
 {
     return(BaseDA <TEntity, TId> .SortPaging <TEntity>(((IQueryable <TEntity>) this.dbSet).Where <TEntity>(predicate), FieldSort, FieldOption, RowPerPage, CurrentPage, Keyword, SearchInField, ref this.TotalRecord));
 }
예제 #4
0
 public IQueryable <TEntity> GetByQuery(string FieldSort, bool FieldOption)
 {
     return(BaseDA <TEntity, TId> .Sort <TEntity>((IQueryable <TEntity>) this.dbSet, FieldSort, FieldOption, ref this.TotalRecordAll));
 }