Connections are managed by the driver and most of the api classes are threadsafe. While you don't need to do this, I always do: Put a reference to MongoServer in some common location and reuse that instance. Your IoC container is a good place for this, or a base class, depending on your design principles.
On Thursday, October 11, 2012 7:58:32 AM UTC-7, adrin wrote:
Hi,
I wonder if there are any special considerations when creating .NET web applicaitons (
ASP.NET MVC) using mongodb c# driver. What I mean in particular is how to manage connections (or is it managed by the driver) and are there any best practices to follow in multithreaded / web scenario?