Class MongoQueryProvider
A mongo query provider.
Inherited Members
Namespace: Kephas.Data.MongoDB.Linq
Assembly: Kephas.Data.MongoDB.dll
Syntax
public class MongoQueryProvider : DataContextQueryProvider, IDataContextQueryProvider, IAsyncQueryProvider, IQueryProvider
Constructors
| Improve this Doc View SourceMongoQueryProvider(IQueryOperationContext, IQueryProvider)
Initializes a new instance of the MongoQueryProvider class.
Declaration
public MongoQueryProvider(IQueryOperationContext queryOperationContext, IQueryProvider nativeQueryProvider)
Parameters
Type | Name | Description |
---|---|---|
IQueryOperationContext | queryOperationContext | The query operation context. |
System.Linq.IQueryProvider | nativeQueryProvider | The native query provider. |
Methods
| Improve this Doc View SourceCreateQuery<TElement>(IQueryable<TElement>)
Constructs an System.Linq.IQueryable object that can evaluate the query represented by a specified expression tree.
Declaration
protected override IQueryable<TElement> CreateQuery<TElement>(IQueryable<TElement> nativeQuery)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.IQueryable<TElement> | nativeQuery | The native query. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<TElement> | An System.Linq.IQueryable that can evaluate the query represented by the specified expression tree. |
Type Parameters
Name | Description |
---|---|
TElement | The query element type. |
Overrides
ExecuteAsync(Expression, CancellationToken)
Asynchronously executes the query represented by a specified expression tree.
Declaration
public override Task<object> ExecuteAsync(Expression expression, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression | An expression tree that represents a LINQ query. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to observe while waiting for the task to complete. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | A task that represents the asynchronous operation. The task result contains the value that results from executing the specified query. |
Overrides
| Improve this Doc View SourceExecuteAsync<TResult>(Expression, CancellationToken)
Asynchronously executes the strongly-typed query represented by a specified expression tree.
Declaration
public override Task<TResult> ExecuteAsync<TResult>(Expression expression, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression | An expression tree that represents a LINQ query. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to observe while waiting for the task to complete. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | A task that represents the asynchronous operation. The task result contains the value that results from executing the specified query. |
Type Parameters
Name | Description |
---|---|
TResult | The type of the value that results from executing the query. |