11.. _csharp-language-center:
22
3+ .. include:: /includes/unicode-checkmark.rst
4+
35==========================
4- C# and .NET MongoDB Driver
6+ MongoDB C#/ .NET Driver
57==========================
68
79.. default-domain:: mongodb
@@ -12,192 +14,75 @@ C# and .NET MongoDB Driver
1214 :depth: 1
1315 :class: twocols
1416
17+ Introduction
18+ ------------
19+
1520The official MongoDB C#/.NET Driver provides asynchronous interaction
16- with MongoDB. For the official MongoDB C#/.NET reference, see:
21+ with MongoDB.
1722
18- - `MongoDB C#/.NET Documentation
19- <http://mongodb.github.io/mongo-csharp-driver/?jmp=docs>`_
23+ - `Getting Started <http://mongodb.github.io/mongo-csharp-driver/2.8/getting_started/>`__
2024
21- - `MongoDB C# API Documentation
22- <http://api.mongodb.com/csharp/current?jmp=docs>`_.
25+ - `Usage Guide <http://mongodb.github.io/mongo-csharp-driver/?jmp=docs>`__
2326
24- Driver Features
25- ---------------
27+ - `API Reference <http://api.mongodb.com/csharp/current?jmp=docs>`_
2628
27- MongoDB Driver
28- An updated .NET driver offering a full asynchronous stack. For
29- documentation on the update .NET driver, see `MongoDB C#/.NET Driver
30- documentation <http://mongodb.github.io/mongo-csharp-driver/2.7/?jmp=docs>`_.
29+ - `Changelog <http://mongodb.github.io/mongo-csharp-driver/2.8/what_is_new/>`__
3130
32- BSON Library
33- A standalone BSON library with a serialization infrastructure that
34- you can use to build high-performance serializers. For documentation
35- on the BSON library, see `BSON Reference
36- <http://mongodb.github.io/mongo-csharp-driver/2.7/reference/bson/?jmp=docs>`_.
31+ - `Source Code <https://github.com/mongodb/mongo-csharp-driver>`__
3732
38- Core Library
39- A new core library upon which MongoDB .NET Driver is built. Users
40- can use the new core library to build alternative or experimental
41- high-level APIs. For documentation on the core library, see `Driver
42- Core <http://mongodb.github.io/mongo-csharp-driver/2.7/reference/driver_core/?jmp=docs>`_
4333
44- Download/Upgrade
45- ----------------
34+ Installation
35+ ------------
4636
47- The recommended way to download the driver is to use ``nuget``.
48- For more information, see `Getting Started
49- <http://mongodb.github.io/mongo-csharp-driver/2.7/getting_started?jmp=docs>`_.
37+ ``NuGet`` is the simplest way to get the driver. `MongoDB.Driver <http://www.nuget.org/packages/mongodb.driver>`__ should be used for all new projects.
5038
51- If upgrading from an earlier version of the C#/.NET driver, see also
52- `What's New
53- <http://mongodb.github.io/mongo-csharp-driver/2.7/upgrading/?jmp=docs>`_.
39+ For more information, see `Installation
40+ <http://mongodb.github.io/mongo-csharp-driver/2.8/getting_started/installation/>`_.
5441
55- Compatibility
56- -------------
5742
58- MongoDB Compatibility
59- ~~~~~~~~~~~~~~~~~~~~~
43+ Connect to MongoDB Atlas
44+ ------------------------
6045
61- .. include:: /includes/extracts/csharp- driver-compatibility-matrix-mongodb.rst
46+ To connect to a `MongoDB Atlas <https://docs.atlas.mongodb.com/>`_ cluster, use the `Atlas connection string <https://docs.atlas.mongodb.com/ driver-connection>`__ for your cluster:
6247
63- .. list-table::
64- :header-rows: 1
65- :stub-columns: 1
66- :class: compatibility-large
67-
68- * - C#/.NET Driver Version
69- - MongoDB 4.0
70- - MongoDB 3.6
71- - MongoDB 3.4
72- - MongoDB 3.2
73- - MongoDB 3.0
74- - MongoDB 2.6
75-
76- * - Version 2.7
77- - |checkmark|
78- - |checkmark|
79- - |checkmark|
80- - |checkmark|
81- - |checkmark|
82- - |checkmark|
83-
84- * - Version 2.6
85- -
86- - |checkmark|
87- - |checkmark|
88- - |checkmark|
89- - |checkmark|
90- - |checkmark|
91-
92- * - Version 2.5
93- -
94- - |checkmark|
95- - |checkmark|
96- - |checkmark|
97- - |checkmark|
98- - |checkmark|
99-
100- .. include:: /includes/extracts/csharp-driver-compatibility-full-mongodb.rst
101-
102- .. include:: /includes/older-server-versions-unsupported.rst
103-
104- .NET Language Compatibility
105- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
48+ .. code-block:: csharp
10649
107- .. include:: /includes/extracts/csharp-driver-compatibility-matrix-language.rst
50+ using MongoDB.Bson;
51+ using MongoDB.Driver;
52+ // ...
53+ var client = new MongoClient(
54+ "mongodb+srv://<username>:<password>@<cluster-address>/test"
55+ );
56+ var database = client.GetDatabase("test");
10857
109- .. list-table::
110- :header-rows: 1
111- :stub-columns: 1
112- :class: compatibility-large
113-
114- * - Driver Version
115- - .NET 3.5
116- - .NET 4.0
117- - .NET 4.5
118- - .NET 4.6
119- - .NET Core 1.0
120- - .NET Core 1.1
121- - .NET Core 2.0
122-
123- * - Version 2.7
124- -
125- -
126- - |checkmark|
127- - |checkmark|
128- - |checkmark|
129- - |checkmark|
130- - |checkmark|
131-
132- * - Version 2.6
133- -
134- -
135- - |checkmark|
136- - |checkmark|
137- - |checkmark|
138- - |checkmark|
139- - |checkmark|
140-
141- * - Version 2.5
142- -
143- -
144- - |checkmark|
145- - |checkmark|
146- - |checkmark|
147- - |checkmark|
148- - |checkmark|
149-
150- .. include:: /includes/extracts/csharp-driver-compatibility-full-language.rst
15158
152- .. include:: /includes/unicode-checkmark.rst
59+ See `Connecting <http://mongodb.github.io/mongo-csharp-driver/2.7/reference/driver/connecting/>`__
60+ for more information.
15361
154- Visual Studio Support
155- ~~~~~~~~~~~~~~~~~~~~~
15662
157- The current version of the C# Driver has been built and tested using
158-
159- - Visual Studio 2017
160-
161-
162- Presentations
63+ Compatibility
16364-------------
16465
165- - `LINQ support in C#/.NET driver (slide deck)
166- <https://speakerdeck.com/mongodb/dot-net-driver-robert-stam-10gen>`_
167- (Aug 2012)
168-
169- - `What's new in the .NET driver (slide deck)
170- <https://speakerdeck.com/mongodb/whats-new-in-the-net-driver>`_ (Jul
171- 2012)
172-
173- - `C# Development (conference videos)
174- <https://www.mongodb.com/presentations?application=All&programming_lang=
175- 46&speaker=&event=&language=All?jmp=docs>`_
66+ MongoDB Compatibility
67+ ~~~~~~~~~~~~~~~~~~~~~
17668
69+ .. include:: /includes/extracts/csharp-driver-compatibility-matrix-mongodb.rst
17770
178- Community Articles
179- ------------------
71+ .. include:: /includes/mongodb-compatibility-table-csharp.rst
18072
181- - `How to MongoDB with C#
182- <https://blog.oz-code.com/how-to-mongodb-in-c-part-1/>`_
73+ Language Compatibility
74+ ~~~~~~~~~~~~~~~~~~~~~~
18375
184- - `A MongoDB Tutorial using C# and ASP.NET MVC
185- <http://www.joe-stevens.com/2011/10/02/a-mongodb-tutorial-using-c-and-asp-net-mvc/>`_
76+ .. include:: /includes/extracts/csharp-driver-compatibility-matrix-language.rst
18677
187- - `Experimenting with MongoDB from C#
188- <http://odetocode.com/Blogs/scott/archive/2009/10/13/experimenting-with-mongodb-from-c.aspx>`_
78+ .. include:: /includes/language-compatibility-table-csharp.rst
18979
190- - `Introduction to MongoDB for .NET
191- <http://www.highoncoding.com/Articles/678_Introduction_to_MongoDb_Database.aspx>`_
19280
193- - `Implementing a Blog Using ASP.NET MVC and MongoDB
194- <http://highoncoding.com/Articles/686_Implementing_Blog_Using_ASP_NET_MVC_and_MongoDb.aspx>`_
81+ How to get help
82+ ---------------
19583
196- - `Intro Article using a Post and Comments Example
197- <http://www.codeproject.com/KB/database/MongoDBCS.aspx>`_
84+ - Join our `Google Group <https://groups.google.com/forum/#!forum/mongodb-user>`__.
85+ - Ask on `Stack Overflow <https://stackoverflow.com/questions/tagged/mongodb+c%23>`__.
86+ - Visit our `Support Channels <https://docs.mongodb.com/manual/support/>`__.
87+ - See our `JIRA <https://jira.mongodb.org/projects/CSHARP/summary>`__ to raise issues or request features.
19888
199- - `Tutorial MongoDB con ASP.NET MVC - Ejemplo Práctico
200- <https://geeks.ms/gperez/2011/12/02/tutorial-mongodb-con-asp-net-mvc-ejemplo-prctico/>`_
201-
202- - `A Quick MongoDB Repository
203- <http://selfdocumenting.net/a-quick-mongodb-repository>`_
0 commit comments