Closed ducware closed 7 months ago
Hey Dang!
I prefer not to couple the EmailSettings
class with the configuration section. I usually go with either what we currently have:
Or inlining the section name like so:
configuration.Bind("EmailSection", emailSettings);
Your approach is also very common, it's mostly a matter of taste
What do you think if you change: Your code:
The code becomes like this:
Similar to other settings, this will probably be more flexible for code, I think, have a nice day!