public QueryWithProjectionBuilder()
 {
     this.query = new QueryWithProjection <T, TResult>();
 }
Exemplo n.º 2
0
 public async Task <List <TResult> > QueryAsync <TResult>(QueryWithProjection <T, TResult> query)
 {
     return(await this.entities.AsQueryable <T>()
            .EvaluateQuery(query)
            .ToListAsync());
 }
Exemplo n.º 3
0
        public static IQueryable <TResult> EvaluateQuery <T, TResult>(this IQueryable <T> inputQuery, QueryWithProjection <T, TResult> query)
        {
            inputQuery = EvaluateQuery <T>(inputQuery, query);

            return(inputQuery.Select(query.Selector));
        }