I have this example class :
public class Test
{
private ObjectId _mongoID;
private A _a = new A();
private ArrayList _alData = new ArrayList(); // Arraylist of B objects
#endregion
public Test(A a, ArrayList alData)
{
_a = a;
_alData = alData;
}
[BsonId]
public ObjectId MongoID
{
get;
set;
}
public A a
{
get
{
return _a;
}
}
public Array dta
{
get
{
return _alData.ToArray();
}
}
}
I hope to have this result :
{ "_id" : ObjectId("000000000000000000000000"), "_a":{A members}, "dta":[{B members}, {B members}]}
How can I do ?
Thanks