Trying to figure out how to access nested array properties when using the strongly typed query builders for mongodb in c#. Lets say I have the following classes:
public class V {
public Guid _id { get; set; }
public List<S> S { get; set; }
}
public class S {
public Guid I { get; set;}
/* other fields */
}
V is the document type. I want to build a query like this:
var id = Guid.NewGuid();
var query = Query<V>.EQ(v => v.S.I, id);
However that doesn't compile because the S property on V is a List. The resulting mongo query that I would look like to see is this (actual guid syntax is not correct, but the left side is the important part:
{ "S.I": "99ebc751-c12a-4873-8c3f-cb510b26a082" }
How do I do this?