I have 2 classes:
public class Store
{
public Guid ID;
public List<Product> Products;
}
public class Product
{
public Guid ID;
public string Name;
}
I want to save "Store" in my MongoDB but I don't want the collection of Stores to include the content of "Product" (to save space \ duplication). I want to create another colleciton of Product, and use some kind of ID reference to the matched document.
Does MongoDB 2.4.4 c# driver support this without changing my models? (I can't modify them - used in an API calls). How can I implement it?