Reacting to configuration changes

This commit is contained in:
Pranav K 2015-09-25 07:37:59 -07:00
parent ca874a3ff7
commit b9be30c6cd
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,5 @@
using IdentitySample.Models;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Diagnostics;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Microsoft.Framework.Configuration;
@ -23,7 +21,8 @@ namespace IdentitySamples
* Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources,
* then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely.
*/
var builder = new ConfigurationBuilder(env.ApplicationBasePath)
var builder = new ConfigurationBuilder()
.SetBasePath(env.ApplicationBasePath)
.AddJsonFile("LocalConfig.json")
.AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.