3 ms·
> I don't see a serious consensus and it frustrates me. If you're saying that there's no one right way to do it, then I broadly disagree. There's the (very fle
by SideburnsOfDoom 1y ago
> I don't see a serious consensus and it frustrates me.
If you're saying that there's no one right way to do it, then I broadly disagree. There's the (very flexible) .NET Configuration system (1) - that is the right way to do it. You should start with appsettings.json and other sources, and end up with injecting IOptions<T> into your code. Consistently.
If you're saying that in your experience, far too many people don't use this system, then who am I to disagree with your experience? Sure, it happens. YMMV. I would be insisting that they move to the .NET Configuration system, though. If they're serious.
1) https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration https://learn.microsoft.com/en-us/dotnet/core/extensions/con...