예제 #1
0
 private IQueryable <Flat> ApplySpecification(ISpecification <Flat> spec)
 {
     return(SpecificationEvaluator <Flat> .GetQuery(session.Query <Flat>().AsQueryable(), spec));
 }
예제 #2
0
        private IQueryable <T> ApplySpecification(ISpecification <T> spec)
        {
            var evaluator = new SpecificationEvaluator <T>();

            return(evaluator.GetQuery(this.dbContext.Set <T>().AsQueryable(), spec));
        }
 private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     return(SpecificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec));
 }
예제 #4
0
 private IQueryable <TEntity> ApplySpecification(ISpecification <TEntity> spec)
 {
     return(SpecificationEvaluator <TEntity> .GetQuery(_dbContext.Set <TEntity>().AsQueryable(), spec));
 }
예제 #5
0
파일: EfRepository.cs 프로젝트: emtosa/demo
        private IQueryable <T> ApplySpecification <T>(ISpecification <T> spec) where T : BaseEntity
        {
            var evaluator = new SpecificationEvaluator <T>();

            return(evaluator.GetQuery(_dbContext.Set <T>().AsQueryable(), spec));
        }
예제 #6
0
 public async Task <IEnumerable <TEntity> > ApplyAsync(ISpecification <TEntity, TKey> specification)
 {
     return(await SpecificationEvaluator <TEntity, TKey>
            .GetQuery(_context.Set <TEntity>().AsQueryable(), specification)
            .ToListAsync());
 }
예제 #7
0
 public Palma Get(ISpecification <Palma> especificacion)
 {
     return(SpecificationEvaluator <Palma> .GetQuery(_context.Palmas.AsQueryable(), especificacion).FirstOrDefault());
 }
예제 #8
0
 public Cultivo Get(ISpecification <Cultivo> especificacion)
 {
     return(SpecificationEvaluator <Cultivo> .GetQuery(_context.Cultivos.AsQueryable(), especificacion).FirstOrDefault());
 }
예제 #9
0
 private IQueryable <TEntity> ApplySpecification(ISpecification <TEntity, TPrimaryKeyType> specification) =>
 SpecificationEvaluator <TEntity, TPrimaryKeyType> .GetQuery(dbContext.Set <TEntity>().AsQueryable(), specification);
예제 #10
0
 protected IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     return(SpecificationEvaluator <T> .GetQuery(_dbContext.Set <T>().AsQueryable(), spec));
 }
예제 #11
0
 public Tarea Get(ISpecification <Tarea> especificacion)
 {
     return(SpecificationEvaluator <Tarea> .GetQuery(_context.Tareas.AsQueryable(), especificacion).FirstOrDefault());
 }
예제 #12
0
 protected IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     return(SpecificationEvaluator <T> .GetQuery(CreateQuery(spec.PartitionKeyValue), spec));
 }
예제 #13
0
 private IQueryable <Product> ApplySpecification(ISpecifications <Product> spec)
 {
     return(SpecificationEvaluator <Product> .GetQuery(_context.Set <Product>().AsQueryable(), spec));
 }
예제 #14
0
        public async Task <List <T> > GetListAsync <T>(ISpecification <T> spec) where T : Entity
        {
            var query = new SpecificationEvaluator <T>().GetQuery(_shopDbContext.Set <T>().AsQueryable(), spec);

            return(await query.ToListAsync());
        }
예제 #15
0
        public IEnumerable <T> FindWithSpecificationPattern(ISpecification <T> specification = null)
        {
            IQueryable <T> data = _context.Set <T>().AsQueryable();

            return(SpecificationEvaluator <T> .GetQuery(data, specification));
        }
예제 #16
0
 public SpecificationEvaluatorTests()
 {
     this.evaluator = new SpecificationEvaluator <Store>();
 }
예제 #17
0
 public static IQueryable <T> ApplySpecification <T>(this IQueryable <T> query, ISpecification <T> spec) where T : EntityBase, IEntity
 {
     return(SpecificationEvaluator <T> .GetQuery(query, spec));
 }
예제 #18
0
 private async Task <IEnumerable <IGrouping <TK, T> > > ApplyGroupingSpecificationAsync <TK>(IGroupingSpecification <T, TK> spec)
 {
     // must return IEnumerable since GroupBy computation on database is not supported yet in EF Core 3.0
     // TODO: change as soon EF Core supports GroupBy
     return(await SpecificationEvaluator <T> .GetGroupingEnumerableAsync(DbContext.Set <T>().AsQueryable(), spec));
 }
예제 #19
0
 public ICollection <Palma> Gets(ISpecification <Palma> especificacion)
 {
     return(SpecificationEvaluator <Palma> .GetQuery(_context.Palmas.AsQueryable(), especificacion).ToList());
 }
예제 #20
0
 public ICollection <Tercero> Gets(ISpecification <Tercero> especificacion)
 {
     return(SpecificationEvaluator <Tercero> .GetQuery(_context.Terceros.AsQueryable(), especificacion).ToList());
 }
 private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     return(SpecificationEvaluator <T> .GetQuery(_collection.AsQueryable(), spec));
 }
예제 #22
0
 public Tercero Get(ISpecification <Tercero> especificacion)
 {
     return(SpecificationEvaluator <Tercero> .GetQuery(_context.Terceros.AsQueryable(), especificacion).FirstOrDefault());
 }
예제 #23
0
        private IQueryable <T> ApplySpecification(ISpecification <T> spec)
        {
            var query = _context.Set <T>().AsQueryable();

            return(SpecificationEvaluator <T> .Evaluate(query, spec));
        }
        private IQueryable <TEntity> ApplySpecification(ISpecification <TEntity> specification)
        {
            var evaluator = new SpecificationEvaluator <TEntity>();

            return(evaluator.GetQuery(DbContext.Set <TEntity>().AsQueryable(), specification));
        }
예제 #25
0
 private IQueryable <TEntity> ApplySpecification <TEntity>(ISpecification <TEntity> spec) where TEntity : BaseEntity
 {
     return(SpecificationEvaluator.GetQuery(_context.Set <TEntity>().AsQueryable(), spec));
 }
예제 #26
0
        private IQueryable <T> ApplySpecification <T>(ISpecification <T> spec) where T : class
        {
            var evaluator = new SpecificationEvaluator();

            return(evaluator.GetQuery(_context.Set <T>().AsQueryable(), spec));
        }
예제 #27
0
 private IQueryable <TEntity> ApplySpecification(ISpecification <TEntity> spec)
 {
     return(SpecificationEvaluator <TEntity> .GetQuery(dbSet.AsQueryable(), spec));
 }
예제 #28
0
 protected IQueryable <TEntity> ApplySpecification(ISpecification <TEntity> spec)
 {
     return(SpecificationEvaluator.ApplySpecification(Context.Set <TEntity>().AsQueryable(), spec));
 }
예제 #29
0
        private IQueryable <T> ApplySpecification(ISpecification <T> spec)
        {
            var evaluator = new SpecificationEvaluator <T>();

            return(evaluator.GetQuery(dbSet.AsQueryable(), spec));
        }
예제 #30
0
 public IEnumerable <Client> GetBy(ISpecification <Client> spec = null)
 {
     return(SpecificationEvaluator <Client> .ApplySpecification(_clients.AsQueryable(), spec));
 }