示例#1
0
        public IQueryable <TEntity> GetAll(Expression <Func <TEntity, bool> > filterExpression = null)
        {
            IQueryable <TEntity> query = _dbContext.Set <TEntity>();

            if (filterExpression != null)
            {
                query = query.Where(filterExpression);
            }
            return(query);
        }
示例#2
0
 public EFGenericRepository(WorkerContext context)
 {
     _context = context;
     _dbSet   = context.Set <TEntity>();
 }