我想插入一条有孩子的记录,然后用c#将写入的内容显示在屏幕上。这是我到目前为止所拥有的:
MongoCollection<BsonDocument> house= building.GetCollection<BsonDocument>("house");
BsonDocument rooms= new BsonDocument {
{ "roomName", name},
{ "location", <--child array here: 1stfloor, 2ndlfloor, topfloor.
{ "roomID", guidstring}
};
house.Insert(rooms);