by
10. March 2010 02:42
Normally while using mongodb-csharp driver you have to add new fields with sequential Appends.
Well, personally I prefer
Document doc = new Document();
doc.Fill(
Width => 100,
Height => 200,
Attributes => new Pairs{ attr1 => 1,
attr2 => 2 });
over
Document oldstyle = new Document()
.Append("Width", 100)
.Append("Height", 200)
.Append("Attributes", new Document().Append("attr1", 1)
.Append("attr2", 2));
Do you like the first case? Try MongoDB C# eXtras