This commit is contained in:
Kirthi Krishnamraju 2015-05-18 13:44:21 -07:00
Родитель 170bad48c4
Коммит d298c9206e
6 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -103,17 +103,17 @@ namespace MusicStore.Models
// await roleManager.CreateAsync(new IdentityRole(adminRole));
//}
var user = await userManager.FindByNameAsync(configuration.Get<string>(defaultAdminUserName));
var user = await userManager.FindByNameAsync(configuration.Get(defaultAdminUserName));
if (user == null)
{
user = new ApplicationUser { UserName = configuration.Get<string>(defaultAdminUserName) };
await userManager.CreateAsync(user, configuration.Get<string>(defaultAdminPassword));
user = new ApplicationUser { UserName = configuration.Get(defaultAdminUserName) };
await userManager.CreateAsync(user, configuration.Get(defaultAdminPassword));
//await userManager.AddToRoleAsync(user, adminRole);
await userManager.AddClaimAsync(user, new Claim("ManageStore", "Allowed"));
}
#if TESTING
var envPerfLab = configuration.Get<string>("PERF_LAB");
var envPerfLab = configuration.Get("PERF_LAB");
if (envPerfLab == "true")
{
for (int i = 0; i < 100; ++i)

Просмотреть файл

@ -34,7 +34,7 @@ namespace MusicStore
public void ConfigureServices(IServiceCollection services)
{
services.Configure<AppSettings>(Configuration.GetSubKey("AppSettings"));
services.Configure<AppSettings>(Configuration.GetConfigurationSection("AppSettings"));
var useInMemoryStore = _platform.IsRunningOnMono || _platform.IsRunningOnNanoServer;

Просмотреть файл

@ -45,7 +45,7 @@ namespace MusicStore
public void ConfigureServices(IServiceCollection services)
{
services.Configure<AppSettings>(Configuration.GetSubKey("AppSettings"));
services.Configure<AppSettings>(Configuration.GetConfigurationSection("AppSettings"));
// Add EF services to the services container
services.AddEntityFramework()

Просмотреть файл

@ -47,7 +47,7 @@ namespace MusicStore
public void ConfigureServices(IServiceCollection services)
{
services.Configure<AppSettings>(Configuration.GetSubKey("AppSettings"));
services.Configure<AppSettings>(Configuration.GetConfigurationSection("AppSettings"));
var useInMemoryStore = _platform.IsRunningOnMono || _platform.IsRunningOnNanoServer;

Просмотреть файл

@ -38,7 +38,7 @@ namespace MusicStore
public void ConfigureServices(IServiceCollection services)
{
services.Configure<AppSettings>(Configuration.GetSubKey("AppSettings"));
services.Configure<AppSettings>(Configuration.GetConfigurationSection("AppSettings"));
//Sql client not available on mono
var useInMemoryStore = _runtimeEnvironment.RuntimeType.Equals("Mono", StringComparison.OrdinalIgnoreCase);

Просмотреть файл

@ -45,7 +45,7 @@ namespace MusicStore
public void ConfigureServices(IServiceCollection services)
{
services.Configure<AppSettings>(Configuration.GetSubKey("AppSettings"));
services.Configure<AppSettings>(Configuration.GetConfigurationSection("AppSettings"));
//Sql client not available on mono
string value;