-
Notifications
You must be signed in to change notification settings - Fork 13
Release Notes
Addition of the 'Discriminator' field to the Section table. With the Discriminator field, a configuration section can be further categorized via a collection of Key-Value pairs defined using a Json formatted string.
If you are upgrading from an earlier version of configuration.entityframework, you will need to perform the following step
Filter appSettings for 'Patrick'.
var config = new ConfigurationBuilder()
.SetBasePath(Environment.CurrentDirectory)
.AddJsonFile("appsettings.json", true, true)
.AddEntityFrameworkConfig(builder => builder.UseSqlServer(@"Data Source=.;Initial Catalog=Configuration;Integrated Security=True"), "applicationname', @"{""Username"":""Patrick""})
.Build();
Addition of the 'Aspect' field to the Section table. With the Aspect field, cross-cutting configuration data can be more effectively categorised.
If you are upgrading from an earlier version of configuration.entityframework, you will need to perform the following 2 steps
-
Set the 'Aspect' field to 'settings' for any existing or new record created in the Section Table. Alternatively, pass null into the 'aspect' argument for the AddEntityFrameworkConfig extension method as in the following sample code.
Scope EFConfigurationProvider data to "settings". Note, when calling the AddEntityFrameworkConfig method, the 'aspect' argument is optional and will default to "settings".
var config = new ConfigurationBuilder()
.SetBasePath(Environment.CurrentDirectory)
.AddJsonFile("appsettings.json", true, true)
.AddEntityFrameworkConfig(builder => builder.UseSqlServer(@"Data Source=.;Initial Catalog=Configuration;Integrated Security=True"), "applicationname', "settings")
.Build();