C# MongoDB Sorgulama 2

[code lang=”c”]
MongoServerSettings settings = new MongoServerSettings();
settings.Server = new MongoServerAddress("127.0.0.1", 27017);
MongoServer mongo = MongoServer.Create();
mongo.Connect();
var db = mongo.GetDatabase("Test");
using (mongo.RequestStart(db))
{
var collection = db.GetCollection<BsonDocument>("Person");
var entity = collection.FindAll();
mongo.Disconnect();
}

Bir cevap yazın