Skip to content

How can I extract the DalManager value from appsettings.json in a Core-project? #1851

Answered by rockfordlhotka
pecen asked this question in General
Discussion options

You must be logged in to vote

.NET Core (and .NET 5) have a whole new configuration subsystem that is fully documented on https://docs.microsoft.com.

The trick with the new dotnetcore subsystem is that it needs to be configured. ASP.NET Core defaults to a set of configuration that includes reading (and overriding, in this order):

  • config file
  • environment variables
  • command line
  • values set explicitly in code

I think this is a reasonable tutorial.

CSLA how has a number of configuration options to choose from:

  1. Use the Csla.Configuration.ConfigurationManager abstraction and manually load the appsettings collection
  2. Use the ConfigureCsla extension to load CSLA settings from the new config subsystem
  3. Use the fluent config AP…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pecen
Comment options

@rockfordlhotka
Comment options

Answer selected by pecen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants