private IQueryable <T> ApplySpecification(ISpecification <T> spec) { //-The ApplySpecification method in the GenericRepository<T> calls the GetQuery method, // passing in the 'raw' data retrieved from the db context as an IQueryable of a generic // dbset.Note that _context.Set<T>()(Assume T = Product) is exactly the same as _context. // Products and allows the generic nature of this implementation.We also pass in the 'spec' // which defines the filter criteria and additional data to include. return(SpesificationEvaluator <T> .GetQuery(storeContext.Set <T>().AsQueryable(), spec)); }
private IQueryable <T> ApplySpecification(ISpecification <T> spec) { return(SpesificationEvaluator <T> .GetQuery(_context.Set <T>().AsQueryable(), spec)); }