protected override IQueryable <T> GetAllQuery(IQueryOptions <T> queryOptions, IFetchStrategy <T> fetchStrategy) { if (queryOptions == null) { return(GetAllQuery(fetchStrategy)); } var query = BaseQuery(fetchStrategy); return(queryOptions.Apply(query)); }
protected override T FindQuery(ISpecification <T> criteria, IQueryOptions <T> queryOptions) { if (queryOptions == null) { return(FindQuery(criteria)); } var query = queryOptions.Apply(BaseQuery()); return(criteria.SatisfyingEntityFrom(query)); }
protected override IQueryable <T> GetAllQuery(IQueryOptions <T> queryOptions) { if (queryOptions == null) { return(GetAllQuery()); } var query = BaseQuery(); return(queryOptions.Apply(query)); }
private IQueryable <TEntity> GetAllQuery(IQueryOptions <TEntity> queryOptions = null) { var baseQuery = ExecuteBaseQuery(); if (queryOptions != null) { baseQuery = queryOptions.Apply(baseQuery); } return(baseQuery); }
protected override T FindQuery(ISpecification <T> criteria, IQueryOptions <T> queryOptions) { if (queryOptions == null) { return(FindQuery(criteria)); } var query = queryOptions.Apply(BaseQuery(criteria.FetchStrategy)); SetTraceInfo("Find", query); return(criteria.SatisfyingEntityFrom(query)); }
protected override IQueryable <T> FindAllQuery(ISpecification <T> criteria, IQueryOptions <T> queryOptions) { if (queryOptions == null) { return(FindAllQuery(criteria)); } var query = BaseQuery(criteria.FetchStrategy); query = criteria.SatisfyingEntitiesFrom(query); return(queryOptions.Apply(query)); }
protected override TResult FindQuery <TResult>(ISpecification <T> criteria, Expression <Func <T, TResult> > selector, IQueryOptions <T> queryOptions) { if (queryOptions == null) { return(FindQuery(criteria, selector)); } var query = queryOptions.Apply(BaseQuery(criteria.FetchStrategy)); SetTraceInfo("Find", query); return(criteria.SatisfyingEntitiesFrom(query).Select(selector).FirstOrDefault()); }