BlazorShared and Services (#430)

* Service to Services

* Change Shared project to BlazorShared

* change refrerances to BlazorShared
This commit is contained in:
Shady Nagy
2020-07-25 23:28:21 +02:00
committed by GitHub
parent f4bfc81fe8
commit e1f9ddd192
46 changed files with 87 additions and 76 deletions

View File

@@ -8,7 +8,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Identity
{
public static async Task SeedAsync(UserManager<ApplicationUser> userManager, RoleManager<IdentityRole> roleManager)
{
await roleManager.CreateAsync(new IdentityRole(AuthorizationConstants.Roles.ADMINISTRATORS));
await roleManager.CreateAsync(new IdentityRole(BlazorShared.Authorization.Constants.Roles.ADMINISTRATORS));
var defaultUser = new ApplicationUser { UserName = "demouser@microsoft.com", Email = "demouser@microsoft.com" };
await userManager.CreateAsync(defaultUser, AuthorizationConstants.DEFAULT_PASSWORD);
@@ -17,7 +17,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Identity
var adminUser = new ApplicationUser { UserName = adminUserName, Email = adminUserName };
await userManager.CreateAsync(adminUser, AuthorizationConstants.DEFAULT_PASSWORD);
adminUser = await userManager.FindByNameAsync(adminUserName);
await userManager.AddToRoleAsync(adminUser, AuthorizationConstants.Roles.ADMINISTRATORS);
await userManager.AddToRoleAsync(adminUser, BlazorShared.Authorization.Constants.Roles.ADMINISTRATORS);
}
}
}