Injects a low level IMongoQuery into a LINQ where clause. Can only be used in LINQ queries.

Namespace: MongoDB.Driver.Linq
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version:


public static bool Inject(
	this IMongoQuery query
Visual Basic
<ExtensionAttribute> _
Public Shared Function Inject ( _
	query As IMongoQuery _
) As Boolean
Visual C++
static bool Inject(
	IMongoQuery^ query


Type: MongoDB.Driver..::..IMongoQuery
The low level query.

Return Value

Throws an InvalidOperationException if called.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMongoQuery. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also