Skip to content

Commit 078e567

Browse files
remove poco from quick reference (#82)
1 parent 4352f02 commit 078e567

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

source/quick-reference.txt

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,8 @@
44
Quick Reference
55
===============
66

7-
.. default-domain:: mongodb
8-
97
This page shows the driver syntax for several MongoDB commands and links to
10-
their related reference and API documentation. The examples in this guide use the
11-
``restaurants`` collection from the ``sample_restaurants`` database, part of the
12-
:atlas:`sample datasets </sample-data>` provided by Atlas.
13-
See the :ref:`<csharp-quickstart>` to learn how to create a free MongoDB cluster
14-
and load this sample data.
15-
16-
The examples on this page use the following ``Restaurant``, ``Address``, and ``GradeEntry``
17-
classes as models:
18-
19-
.. literalinclude:: /includes/code-examples/Restaurant.cs
20-
:language: csharp
21-
:copyable:
22-
:dedent:
23-
24-
.. literalinclude:: /includes/code-examples/Address.cs
25-
:language: csharp
26-
:copyable:
27-
:dedent:
28-
29-
.. literalinclude:: /includes/code-examples/GradeEntry.cs
30-
:language: csharp
31-
:copyable:
32-
:dedent:
33-
34-
After you've loaded the sample data into your MongoDB instance, you can use the
35-
following code to access the ``restaurants`` collection:
36-
37-
.. code-block:: csharp
38-
:copyable: true
39-
40-
using MongoDB.Driver;
41-
42-
var camelCaseConvention = new ConventionPack { new CamelCaseElementNameConvention() };
43-
ConventionRegistry.Register("CamelCase", camelCaseConvention, type => true);
44-
45-
const string connectionUri = "<your MongoDB connection URI>";
46-
var client = new MongoClient(connectionUri);
47-
var restaurantsDatabase = mongoClient.GetDatabase("sample_restaurants");
48-
_restaurantsCollection = restaurantsDatabase.GetCollection<Restaurant>("restaurants");
8+
their related reference and API documentation.
499

5010
.. tip:: Using LINQ
5111

0 commit comments

Comments
 (0)