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 •  Added 9 months ago

Join the Newsletter

Subscribe to get our latest content by email.
    We won't send you spam. Unsubscribe at any time.
    We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept