Hey!
So I have read the documentation and learned about the Linq methods that maps to aggragate methods of mondoDB but…
I just could not put things together and haven’t seen any examples of that.
For example, here, https://mongodb.github.io/mongo-csharp-driver/2.11/reference/driver/crud/linq/, we see how to have a IQueryable instance and there’s this:
var query = collection.AsQueryable()
.Where(p => p.Age > 21)
.Select(p => new { p.Name, p.Age });
So how do we go one step further and actually query our collection using this query variable?
after running the code above I just receive something like:
[
{ $match: { Age: { $gt: 21 } } },
{ $project: { Name: 1, Age: 1, _id: 0 } }
]
As I said I want to learn how to fetch the documents that satisfy the conditions above.
Thanks!