diff --git a/source/fundamentals/builders.txt b/source/fundamentals/builders.txt index a3309e66..0f2cdcc5 100644 --- a/source/fundamentals/builders.txt +++ b/source/fundamentals/builders.txt @@ -89,6 +89,16 @@ Alternatively, you can use string-based field names to contruct the filter: var builder = Builders.Filter; var filter = builder.Lt("Price", 20) & builder.Eq("Category", "Perennial"); +If you are using LINQ, you can also use the ``Inject()`` method to apply the filter +to a LINQ query: + +.. code-block:: csharp + :copyable: true + + var builder = Builders.Filter; + var filter = builder.Lt("Price", 20) & builder.Eq("Category", "Perennial"); + var query = collection.AsQueryable().Where(f => filter.Inject()); + Array Operators ~~~~~~~~~~~~~~~