File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,18 @@ The following class represents the documents in the ``sample_mflix.movies`` coll
36
36
.. literalinclude:: /includes/code-examples/projection/Movie.cs
37
37
:language: csharp
38
38
39
+ .. note:: ConventionPack for Pascal Case
40
+
41
+ The properties in the preceding class are named in Pascal case, but the
42
+ field names in the MongoDB collection use camel case. To account for this difference,
43
+ you can use the following code to register a ``ConventionPack`` when your
44
+ application starts:
45
+
46
+ .. code-block:: csharp
47
+
48
+ var camelCaseConvention = new ConventionPack { new CamelCaseElementNameConvention() };
49
+ ConventionRegistry.Register("CamelCase", camelCaseConvention, type => true);
50
+
39
51
.. _csharp-projection-methods:
40
52
41
53
Create a Projection
You can’t perform that action at this time.
0 commit comments