これを試してください
var mongoClient = new MongoClient();
var collection = mongoClient.GetDatabase("test").GetCollection<Rootobject>("test");
ObjectId someId = new ObjectId("599e670f2720317af451db9e");
string someName = "Car 1";
var item = await collection.AsQueryable()
.Where(x => x.Id == someId)
.SelectMany(x => x.Cars)
.Where(x => x.Name == someName)
.FirstOrDefaultAsync();
これにより、以下の集計クエリが生成されます。
{aggregate([{ "$match" : { "_id" : ObjectId("599e670f2720317af451db9e") } }, { "$unwind" : "$Cars" }, { "$project" : { "Cars" : "$Cars", "_id" : 0 } }, { "$match" : { "Cars.Name" : "Car 1" } }])}
これは次の結果を吐き出します:
{ "Cars" : { "Name" : "Car 1", "Labels" : [ { "Label" : "Main", "Color" : "#F49973" } ] } }