Using Mongoose, we can populate reference document
My Document look like this,
var Menu = new Schema({
name: String,
items:[{ type: ObjectId, ref: 'Items' }],
I have stored item document _id in Menu.Items.
So whenever i want to menu with items data, i do the following.
like
menu.findOne().populate( 'items').exec(function(err, menuData ) {
// here with menuData.items we can access referenced document. not just an _id
});
Q1. ) Is there any facility available in .Net C# MongoDb Driver?. Q2. ) How can i store reference of document ?
Thanks