Right now we support basically two UseMongoDB overloads:
.UseMongoDB(connectionString, databaseName)
.UseMongoDB(mongoClient, databaseName)
We want to de-emphasize mongoClient as it:
- Makes ASP.NET DI setup more cumbersome
- Makes disposal ambiguous
- Can't be used by Queryable Encryption builder
Instead we should add two new overloads:
.UseMongoDB(connectionString)
Takes a connection string without a separate database name to be more familiar with some other providers as well as Mongoose etc. and simpler DI setup.
.UseMongoDB(mongoClientSettings, databaseName)
As the alternative to the MongoClient overload for manual configuration through code.