Class BaseQueryProvider
Base abstract class to implement the basic logic of an IQueryProvider
Inheritance
Namespace: PnP.Core.QueryModel
Assembly: PnP.Core.dll
Syntax
public abstract class BaseQueryProvider : object, IAsyncQueryProvider
Methods
AddToBatchAsync<TResult>(Expression, Batch)
Adds the expression to the batch specified
Declaration
public abstract Task<IEnumerableBatchResult<TResult>> AddToBatchAsync<TResult>(Expression expression, Batch batch)
Parameters
Expression
expression
|
Batch
batch
|
Returns
Task<IEnumerableBatchResult<TResult>>
|
Type Parameters
TResult
|
Implements
AddToCurrentBatchAsync<TResult>(Expression)
Adds the expression to the current batch
Declaration
public abstract Task<IEnumerableBatchResult<TResult>> AddToCurrentBatchAsync<TResult>(Expression expression)
Parameters
Expression
expression
|
Returns
Task<IEnumerableBatchResult<TResult>>
|
Type Parameters
TResult
|
Implements
CreateQuery(Expression)
Creates a query for the provided expression
Declaration
public abstract IQueryable CreateQuery(Expression expression)
Parameters
Expression
expression
Expression to create a query for |
Returns
IQueryable
|
CreateQuery<TResult>(Expression)
Creates a query for the provided expression
Declaration
public IQueryable<TResult> CreateQuery<TResult>(Expression expression)
Parameters
Expression
expression
Expression that will be translated into a query |
Returns
IQueryable<TResult>
Created query |
Type Parameters
TResult
Result type of the query |
Execute(Expression)
Executes the provided expression
Declaration
public object Execute(Expression expression)
Parameters
Expression
expression
Expression to execute |
Returns
System.Object
|
Execute<TResult>(Expression)
Executes the provided expression
Declaration
public TResult Execute<TResult>(Expression expression)
Parameters
Expression
expression
Expression to execute |
Returns
TResult
Loaded model instace of type |
Type Parameters
TResult
Resulting type of the linq expression execution |
ExecuteAsync<TResult>(Expression, CancellationToken)
Executes the provided expression
Declaration
public TResult ExecuteAsync<TResult>(Expression expression, CancellationToken cancellationToken)
Parameters
Expression
expression
Expression to execute |
CancellationToken
cancellationToken
Cancellation token |
Returns
TResult
Loaded model instace of type |
Type Parameters
TResult
Resulting type of the linq expression execution |
Implements
ExecuteObjectAsync(Expression, CancellationToken)
Executes the provided expression
Declaration
public abstract Task<object> ExecuteObjectAsync(Expression expression, CancellationToken token)
Parameters
Expression
expression
Expression to execute |
CancellationToken
token
Token for cancellation |
Returns
Task<System.Object>
|