public void AddComment(string prodId, string content) { MongodbFunctions mongo = new MongodbFunctions(); Databases.DomainModel.Message newMessage = new Databases.DomainModel.Message { Content = content, Product = new MongoDBRef("products", new ObjectId(prodId)) }; mongo.AddComment(newMessage, prodId, User.Identity.Name); }