Is Document References in MongoDb a recommended method or Embedded documents is the right way to do it ? My Questions comes in context of following.
class ObjectType1
{
ObjectId ID;
ObjectType2 Type2Element;
}
class ObjectType2
{
ObjectId ID;
}
I understand we could use MongoDBRef to reference ObjectType2 element in first class, but i wasn't able to locate FetchDBRefAs method (am using official mongodb C# driver, may be am looking at wrong place/namespace).
What is recommended way to link entities if required in MongoDb, especially working with C# ? Thanks