mongodb-net -


Apache
Windows
C#

软件简介

mongodb-net (MongoDB.Driver.dll) 是
MongoDB 的 .NET 驱动。支持 C# 和 VB.NET。

示例代码:

//Local Server  
IServer s1 = Mongo.GetServer("mongo://localhost");

//Local Server via Loopback address  
IServer s2 = Mongo.GetServer("mongo://127.0.0.1");

//Local Server with explicit port  
IServer s3 = Mongo.GetServer("mongo://localhost:27017");

//Local Server with IPv6 address  
IServer s4 = Mongo.GetServer("mongo://[::1]")

//Local Server via URI  
Uri uri = new Uri("mongo://127.0.0.1:27017");  
IServer s5 = Mongo.GetServer(uri);

//Explicit Server Binding with hostname and port (no URI required)  
IServer s6 = Mongo.GetServer("localhost", 27017);