Closed MarkusGeigerDev closed 1 year ago
Hi @MarkusGeigerDev have you had a chance to look at this? If you're busy atm I'd be happy to help out with completing the work, cheers.
Hi! Thanks for your offer. I was sick most of last week, but will be back tomorrow morning and I will have a look at your comments! Cheers, Markus
I hope you're feeling better :)
I want to step out, so you can both decide.
I want to step out, so you can both decide.
OK, @wassim-k, since you approved, I'll merge., @SebastianStehle thank you so much for your work and your support!
Problem:
When deploying a containerized application to, e.g., a Kubernetes cluster, chances are that different MongoDb settings come from different sources at deploy time. Database names might be set by the developer, network settings (like server names, ports, tls, etc) will be set by an operator or devops engineer and credentials will be pulled from a vault.
This is really hard to achieve, if everything is mangled into one big connection string.
Proposed solution:
I added overloads for the extension methods
UseMongoDBClient()
andAddMongoDBClient()
that take a configuration delegate which gives the user access to all MongoDB connection settings individually.This allows code like this, where different parts of the connection settings are pulled from different configuration sources:
Edit (sidenote): We do follow the semver rules, don't we? I changed the version to 7.2.0 in accordance with rule 2, but of course I'm open for discussion.