예제 #1
0
 public EfRepository(AuctionDbContext dbContext)
 {
     _dbContext = dbContext;
     _dbSet     = _dbContext.Set <TEntity>();
 }
예제 #2
0
        private IQueryable <TEntity> ApplySpecification(ISpecification <TEntity> spec, bool evaluateCriteriaOnly = false)
        {
            var evaluator = new SpecificationEvaluator();

            return(evaluator.GetQuery <TEntity>(_dbContext.Set <TEntity>().AsQueryable(), spec, evaluateCriteriaOnly));
        }