public async Task <IEnumerable <TEntity> > Query(QueryRequest queryRequest) { var entities = QueryCache.GetEntities(queryRequest); if (entities != null) { return(entities); } entities = (await QueryRepository.Query(queryRequest)).ToList(); QueryCache.Add(queryRequest, entities); return(entities); }