private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     return(SpecificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec));
 }
Beispiel #2
0
 private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     return(SpecificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec)); // product is converted into a Queryable
 }
 private IQueryable <T> EvaluateExpression(ISpecification <T> spec)
 {
     return(SpecificationEvaluator <T> .GenerateExpression(_context.Set <T>(), spec));
 }
        private IQueryable <T> ApplySpecification(ISpecification <T> spec)
        {
            var evaluator = new SpecificationEvaluator <T>();

            return(evaluator.GetQuery(_dbContext.Set <T>().AsQueryable(), spec));
        }
Beispiel #5
0
 protected IQueryable <T> ApplySpecficiation(ISpecification <T> spec, bool isGetCount = false)
 {
     return(SpecificationEvaluator <T> .GetQuery(this._context, spec, isGetCount));
 }
Beispiel #6
0
 private IQueryable <TEntity> ApplySpecification(ISpecification <TEntity> specification)
 {
     return(SpecificationEvaluator <TEntity> .Evaluate(specification, _context));
 }
Beispiel #7
0
        private IQueryable <T> ApplySpecification(ISpecification <T> spec)
        {
            return(SpecificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec));

            //here we have an IQueryable with those expressions that we can then pass to our database
        }
Beispiel #8
0
 // 38-1 Apply specification
 private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     // get the evaluated IQueryable for the setted T type model for the specific specification spec.
     // here is where the EF context mix w/ the personalized IQueryable(The Specification).
     return(SpecificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec));
 }
Beispiel #9
0
 public IQueryable <T> ApplySpecification(ISpecification <T> spec, CancellationToken ct)
 {
     return(SpecificationEvaluator <T> .GetQuery(_dbContext.Set <T>().AsQueryable(), spec));
 }
Beispiel #10
0
 private IQueryable <T> ApplySpecification(ISpecification <T> spec) =>
 SpecificationEvaluator <T> .GetQuery(Context.Set <T>().AsQueryable(), spec);
Beispiel #11
0
 //we have access to T, this will be replaced with product for example
 private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     //we are using set method to set the type of property this is
     //T is for example product
     return(SpecificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec));
 }
Beispiel #12
0
 private IQueryable <T> ApplySpecification <T>(ISpecification <T> spec) where T : BaseEntity
 {
     return(SpecificationEvaluator.GetQuery(_dbContext.Set <T>().AsQueryable(), spec));
 }
Beispiel #13
0
 private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 {
     // System.Console.WriteLine("Specs: " + spec.Criteria);
     return(SpecificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec));
 }
 private IQueryable <T> Applyspcification(ISpecificationRepository <T> specification)
 {
     return(SpecificationEvaluator <T> .GetQuery(_storeContext.Set <T>().AsQueryable(), specification));
 }
Beispiel #15
0
 //this is related to the Pagination class in the Helper folder:
 public async Task <int> CountAsync(ISpecification <T> ISpecification)
 {
     //count the number of result returned (using microsoft .CountAsync() function) (our function name is also CountAsync())
     return(await SpecificationEvaluator <T> .GetQuery(_Context.Set <T>().AsQueryable(), ISpecification).CountAsync());
 }
Beispiel #16
0
 private IQueryable <T> ApplySpecification(ISpecification <T> spec)
 => SpecificationEvaluator <T, TPrimaryKey> .GetQuery(_storeContext.Set <T>().AsQueryable(), spec);