- MongoDB Drivers >
- C# and .NET MongoDB Driver
C# and .NET MongoDB Driver¶
MongoDB C# / .NET Driver¶
The MongoDB C# Driver is the officially supported C# / .NET driver for MongoDB.
- Getting Started with the C# Driver
- C# Driver Tutorial
- C# Driver LINQ Tutorial
- Serialize Documents with the C# Driver
- Authenticate to MongoDB with the C# Driver
- API Documentation
- C# Driver README
- Source Code
Several other C# drivers have been developed by the community. This is the “officially supported MongoDB” C# Driver. It is similar in many ways to the various drivers that came before it, but it is not a direct replacement for any of them. Most people have found it easy to convert to using this driver, but you should expect to have to make some changes.
Downloading the Driver¶
The simplest way to get started is by using the nuget package. The package page will provide details on using nuget.
You can also download binary builds in either .msi and .zip formats from https://github.com/mongodb/mongo-csharp-driver/releases
If you download the .zip file, Windows might require you to “Unblock” the help file. If Windows asks “Do you want to open this file?” when you double click on the CSharpDriverDocs.chm file, clear the check box next to “Always ask before opening this file” before pressing the Open button. Alternatively, you can right click on the CSharpDriverDocs.chm file and select Properties, and then press the Unblock button at the bottom of the General tab. If the Unblock button is not present then the help file does not need to be unblocked.
|supported. compatible. anything incompatible will be fixed:||Supported|
|unsupported. minor incompatibilities may exist:||Minor incompatibility|
|< 1.6||Minor incompatibility||Minor incompatibility||Minor incompatibility|
|1.7-1.7.1||Minor incompatibility||Minor incompatibility||Minor incompatibility|
|1.8-1.8.3||Supported||Minor incompatibility||Minor incompatibility|
Older server versions are unsupported.
.NET Language Compatibility¶
|.NET 2.0||.NET 3.0||.NET 3.5||.NET 4.0||.NET 4.5||Mono 2.10||Mono 3.x|
|<= 1.9.2||Unsupported||Unsupported||Supported||Supported||Supported||Supported||Minor incompatibility|
Visual Studio Support¶
The current version of the C# Driver has been built and tested using
- Visual Studio 2010
- Visual Studio 2012
Questions and Bug Reports¶
Questions about the C# driver (or any other MongoDB topic) can be posted at the mongodb-user Google Group.
Bug reports can be created in JIRA at https://jira.mongodb.org/browse/CSHARP