Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
syntax error in example
*Location*: http://docs.mongodb.org/ecosystem/tutorial/serialize-documents-with-the-csharp-driver/
*User-Agent*: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
*Referrer*: http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-csharp-driver/
*Screen Resolution*: 1366 x 768
*repo*: docs-ecosystem
*source*: tutorial/serialize-documents-with-the-csharp-driver
syntax error in example *Location*: http://docs.mongodb.org/ecosystem/tutorial/serialize-documents-with-the-csharp-driver/ *User-Agent*: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 *Referrer*: http://docs.mongodb.org/ecosystem/tutorial/getting-started-with-csharp-driver/ *Screen Resolution*: 1366 x 768 *repo*: docs-ecosystem *source*: tutorial/serialize-documents-with-the-csharp-driver
Description
hello,[syntax error in example:<MyClass)]
If you want to control the creation of the class map you can provide your own initialization code in the form of a lambda expression:
BsonClassMap.RegisterClassMap<MyClass)(cm => {
cm.MapProperty(c => c.SomeProperty);
cm.MapProperty(c => c.AnotherProperty);
});
=>(thanks you)