Skip to content

Commit

Permalink
Correct the example to access a configuration
Browse files Browse the repository at this point in the history
The key ``Data:DefaultConnection:ConnectionString`` does not exists in the reference appsettings.json.
  • Loading branch information
steveo068 authored and Rick-Anderson committed May 20, 2016
1 parent be409b5 commit 4177374
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aspnet/fundamentals/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ It's not unusual to store configuration values in a hierarchical structure, espe
:linenos:
:language: json

The application uses configuration to configure the right connection string. Access to the ``ConnectionString`` setting is achieved through this key: ``Data:DefaultConnection:ConnectionString``.
The application uses configuration to configure the right connection string. Access to the ``DefaultConnection`` setting is achieved through this key: ``ConnectionStrings:DefaultConnection``.

The settings required by your application and the mechanism used to specify those settings (configuration being one example) can be decoupled using the :ref:`options pattern <options-config-objects>`. To use the options pattern you create your own settings class (probably several different classes, corresponding to different cohesive groups of settings) that you can inject into your application using an options service. You can then specify your settings using configuration or whatever mechanism you choose.

Expand Down

0 comments on commit 4177374

Please sign in to comment.