Description
Hi all,
The C# documentation provide a very basic example on MongoClientSettings. Only the ReplicaSetName parameter is shown but no details about authentication, ssl, and listing the hosts in the linked page.
It would be good to have an example that can be used with MongoDB Atlas like this:
List<MongoServerAddress> _servers = new List<MongoServerAddress>();
|
|
_servers.Add(new MongoServerAddress(<hostname 1>,27017));
|
_servers.Add(new MongoServerAddress(<hostname 2>, 27017));
|
_servers.Add(new MongoServerAddress(<hostname 3>, 27017));
|
|
var settings = new MongoClientSettings
|
{
|
|
|
Credential = MongoCredential.CreateCredential("admin", <username>, <password>),
|
ReplicaSetName = <replicasetName>,
|
Servers = _servers,
|
UseSsl = true,
|
VerifySslCertificate = false,
|
|
};
|
var client = new MongoClient(settings);
|
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
|