What is the most mature MongoDB driver for C#?
Asked Answered
D

7

26

So, there are

  • mongodb-csharp
  • simple-mongodb
  • NoRM

as C# drivers for MongoDB available.

Which one of them is the most mature and stable one? Why would you choose one over the other two?

Are they production ready?

Develop answered 29/4, 2010 at 6:41 Comment(3)
Just for the record: I chose NoRM as my default and I'm very happy with it so far.Develop
Update: now there is an official MongoDB c# driver supported by MongoDB dev team: mongodb.org/display/DOCS/CSharp+Language+CenterHolomorphic
I think NoRM is effectively dead at this time, until another maintainer can be found.Indiscriminate
P
20

The mongodb-csharp driver is about to make a huge push regarding support for typedcollections which will include full Linq support. I think you'll find that it is easy to work.

The other 2 projects are also steaming ahead. If you want .NET 4.0 support, simple-mongodb would be your best bet.

NoRM has a whole bunch of committers who are all great coders, so no problem with it except it doesn't have an official release.

Purposely answered 29/4, 2010 at 21:4 Comment(3)
I would also mention that although we haven't "officially" released, we are very API stable, and I feel the driver is production quality.Khalif
Just to let everyone know. I talked to the developers of mongodb-csharp and there in maintenance mode right now. They recommend for any new projects to use the official MongoDB C# driver. MongoDB has really made a lot of progress on the driver and is a couple weeks a way from production 1.0 release.Paradox
Yes, it was made about 4 years ago.Purposely
V
21

Since this question was answered 10gen have released an official MongoDB C# driver, and although it isn't the most mature C# driver in terms of age, with 10gen behind it it may end up as the most up to date.

It is more low level than the mongodb-csharp driver (no Linq support at the moment) but we haven't found that to be a problem. We moved to the official driver from mongodb-csharp recently on a project (that isn't in production yet) for the following reasons:

  • Replica Set support in an official release
  • SafeMode allows you to specify how many servers a write must be replicated to
  • The driver handles connecting/disconnecting to the database
  • We're hoping that as an official driver, it will have more developer support
Victorvictoria answered 30/11, 2010 at 9:34 Comment(0)
P
20

The mongodb-csharp driver is about to make a huge push regarding support for typedcollections which will include full Linq support. I think you'll find that it is easy to work.

The other 2 projects are also steaming ahead. If you want .NET 4.0 support, simple-mongodb would be your best bet.

NoRM has a whole bunch of committers who are all great coders, so no problem with it except it doesn't have an official release.

Purposely answered 29/4, 2010 at 21:4 Comment(3)
I would also mention that although we haven't "officially" released, we are very API stable, and I feel the driver is production quality.Khalif
Just to let everyone know. I talked to the developers of mongodb-csharp and there in maintenance mode right now. They recommend for any new projects to use the official MongoDB C# driver. MongoDB has really made a lot of progress on the driver and is a couple weeks a way from production 1.0 release.Paradox
Yes, it was made about 4 years ago.Purposely
B
8

I'd go with Sam Corder’s mongodb-csharp. Also checkout this article.

Bostwick answered 29/4, 2010 at 6:46 Comment(1)
We have really huge problems in Sam Corder driver in high traffic projects. never use Samus in big projects.Smokechaser
S
6

For all curious out there. The best combination at this point seems to be official 10gen C# driver combined with fluent-mongo for Linq support:

https://github.com/mongodb/mongo-csharp-driver

https://github.com/craiggwilson/fluent-mongo

Update: with release 1.4 of official C# driver, there'll be no need in fluent-mongo anymore.

Spoilsman answered 15/9, 2011 at 19:52 Comment(0)
L
1

You should use MongoDB.Driver from this nuget package.

You can view the full tutorials for the MongoC# example looking at this video https://www.youtube.com/watch?v=6x0-vHHHpv8

Limousin answered 3/6, 2015 at 19:58 Comment(0)
C
0

A couple reasons to avoid the mongodb-csharp driver:

  1. It doesn't support "or" logic.
  2. It doesn't seem to support geospatial queries, at least we were not able to get it working.
Chessman answered 13/2, 2011 at 16:26 Comment(0)
L
0

There is a performance issue in typed builders (Update<>, Query<>) of official 10gen C# driver. See How to speed up typed builders in 10gen official MongoDB C# driver?

Liquorish answered 7/5, 2013 at 21:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.