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); }
public EFGenericRepository(WorkerContext context) { _context = context; _dbSet = context.Set <TEntity>(); }