How do you design a strongly-typed class for a configuration?

To create a strongly-typed class for binding to a configuration section:

  • The property names and their types match the key names and their value types "exactly" in the configuration.
  • The classes used must be non-abstract with parameterless constructors
  • Only the public accessors (properties) are bound to configuration data but not fields

ASP.NET Core Posted Jul 09, 2020

You can now show your support. 😊

We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept