ドキュメントとして保存されている次のオブジェクト構造を考えてみましょう。
public class Foo
{
public string Id { get; set; }
public ICollection<FooBar> Bars { get; set; }
// ...
}
public class FooBar
{
public string BarId { get; set; }
// ...
}
ドライバーで LINQ スタイルのクエリを使用すると、次のようなものをFind
すべてFoo
含めることができます。FooBar
BarId
var foos = await m_fooCollection.Find( f => f.Bars.Any( fb => fb.BarId == "123") ).ToListAsync();
FilterDefinitionBuilder
インライン LINQ onの代わりに を使用して、この同じクエリを実現するにはどうすればよいFind
ですか?