Answer the question
In order to leave comments, you need to log in
C# MongoDb driver Aggregate from different collections?
There are 4 collections, which are described by the following models:
class A
{
public ObjectId a_id { get; set; }
public List<B> fields { get; set; }
}
class B
{
public ObjectId b_id { get; set; }
public string b_item { get; set; }
}
class C
{
public ObjectId c_id { get; set; }
public ObjectId b_id { get; set; }
public ObjectId d_id { get; set; }
public string c_item { get; set; }
}
class D
{
public ObjectId d_id { get; set; }
public string d_item { get; set; }
}
class Result
{
public string item { get; set; } // item = b_item
public List<ResultItem> items { get; set; }
}
class ResultItem
{
public string str { get; set; } // str = d_item
public string item { get; set; } // item = c_item
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question