//1a. kết nối MongoDBLocal
public string MongoDBLocal_Connect()
{
// Replace the uri string with your MongoDB deployment's connection string.
var client = new MongoClient(
"mongodb://localhost:27017/?readPreference=primary&appname=MongoDB%20Compass&directConnection=true&ssl=false"
);
var database = client.GetDatabase("HvDadabase");
return "ok";
}
0 Nhận xét