Skip to main content

Definition

Assembly: Microsoft.Restier.Core.dll Namespace: Microsoft.Restier.Core.Query

Syntax

Microsoft.Restier.Core.Query.IQueryExecutor

Summary

Represents a service that executes a query.

Remarks

Data provider implemented IQueryExecutor should only handle queries against the specific provider, and delegates all other queries to inner IQueryExecutor.

Methods

ExecuteExpressionAsync Abstract

Asynchronously executes a singleton query and produces a query result.

Syntax

System.Threading.Tasks.Task<Microsoft.Restier.Core.Query.QueryResult> ExecuteExpressionAsync<TResult>(Microsoft.Restier.Core.Query.QueryContext context, System.Linq.IQueryProvider queryProvider, System.Linq.Expressions.Expression expression, System.Threading.CancellationToken cancellationToken)

Parameters

NameTypeDescription
contextMicrosoft.Restier.Core.Query.QueryContextThe query context.
queryProviderSystem.Linq.IQueryProviderA query provider to execute the expression.
expressionSystem.Linq.Expressions.ExpressionAn expression to be composed on the base query.
cancellationTokenSystem.Threading.CancellationTokenA cancellation token.

Returns

Type: System.Threading.Tasks.Task<Microsoft.Restier.Core.Query.QueryResult> A task that represents the asynchronous operation whose result is a query result.

Type Parameters

  • TResult - The type of the singleton query result.

ExecuteQueryAsync Abstract

Asynchronously executes a query and produces a query result.

Syntax

System.Threading.Tasks.Task<Microsoft.Restier.Core.Query.QueryResult> ExecuteQueryAsync<TElement>(Microsoft.Restier.Core.Query.QueryContext context, System.Linq.IQueryable<TElement> query, System.Threading.CancellationToken cancellationToken)

Parameters

NameTypeDescription
contextMicrosoft.Restier.Core.Query.QueryContextThe query context.
querySystem.Linq.IQueryable<TElement>A composed query.
cancellationTokenSystem.Threading.CancellationTokenA cancellation token.

Returns

Type: System.Threading.Tasks.Task<Microsoft.Restier.Core.Query.QueryResult> A task that represents the asynchronous operation whose result is a query result.

Type Parameters

  • TElement - The type of the elements in the query.