protected Task <IQueryable <TResult> > ApplySpecification <TEntity, TResult>(ISpecification <TEntity> spec, IConfigurationProvider configurationProvider) where TEntity : class where TResult : class { return(Task.FromResult(EfSpecificationEvaluator <TEntity, TResult> .GetQuery( _context.Set <TEntity>().AsQueryable(), spec, configurationProvider) )); }
//static List<Kisi> KisileriGetir(Expression<Func<Kisi,bool>>where, Expression<Func<Kisi, string>> orderBy, int take) //{ // return db.Kisiler.Where(where).OrderBy(orderBy).Take(take).ToList(); //} static async Task <List <Kisi> > KisileriGetir(ISpecification <Kisi> specification) { return((await EfSpecificationEvaluator <Kisi> .GetQuery(db.Kisiler, specification)).ToList()); }
private async Task <IQueryable <T> > ApplySpecification(ISpecification <T> specification) { return(await EfSpecificationEvaluator <T> .GetQuery(_dbContext.Set <T>().AsQueryable(), specification)); }
private IQueryable <T> ApplySpecification(ISpecification <T> spec) { return(EfSpecificationEvaluator <T, int> .GetQuery(_dbContext.Set <T>().AsQueryable(), spec)); }
private IQueryable <TResult> ApplySpecification <TResult>(ISpecification <T, TResult> spec) { return(EfSpecificationEvaluator <T, TResult> .GetQuery(_dbContext.Set <T>().AsQueryable(), spec).Result); }
protected Task <IQueryable <TEntity> > ApplySpecification <TEntity>(ISpecification <TEntity> spec) where TEntity : class { return(Task.FromResult( EfSpecificationEvaluator <TEntity> .GetQuery(_context.Set <TEntity>().AsQueryable(), spec))); }
public Task <List <T> > ListBySpecAsync <T>(ISpecification <T> spec) where T : BaseEntity { return(EfSpecificationEvaluator <T, int> .GetQuery(_dbContext.Set <T>(), spec) .ToListAsync()); }
public Task <T> GetBySpecAsync <T>(ISpecification <T> spec) where T : BaseEntity { return(EfSpecificationEvaluator <T, int> .GetQuery(_dbContext.Set <T>(), spec) .SingleOrDefaultAsync()); }