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)); }
//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)); }
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)); }
public IQueryable <TEntity> GetByQuery(string FieldSort, bool FieldOption) { return(BaseDA <TEntity, TId> .Sort <TEntity>((IQueryable <TEntity>) this.dbSet, FieldSort, FieldOption, ref this.TotalRecordAll)); }