Beispiel #1
0
 public Task <IEnumerable <DynamicObject> > ExecuteQueryAsync(Expression queryExpression, CancellationToken cancellation)
 {
     using NHContext nhContext = new NHContext();
     return(Task.FromResult(queryExpression.Execute(nhContext.GetQueryable)));
 }
Beispiel #2
0
 public ValueTask <DynamicObject> ExecuteQueryAsync(Expression queryExpression, CancellationToken cancellation)
 {
     using NHContext nhContext = new NHContext();
     return(new ValueTask <DynamicObject>(queryExpression.Execute(nhContext.GetQueryable)));
 }
 public IEnumerable <DynamicObject> ExecuteQuery(Expression queryExpression)
 {
     using var nhContext = new NHContext();
     return(queryExpression.Execute(queryableProvider: type => nhContext.GetQueryable(type)));
 }