public virtual async Task <ApplicationIdentityResult> CreateAsync(ApplicationRole role) { var identityRole = role.ToIdentityRole(); var identityResult = await _roleManager.CreateAsync(identityRole).ConfigureAwait(false); role.CopyApplicationIdentityRoleProperties(identityRole); return(identityResult.ToApplicationIdentityResult()); }
public static ApplicationRole ToApplicationRole(this ApplicationIdentityRole identityRole) { if (identityRole == null) { return(null); } var applicationRole = new ApplicationRole(); return(applicationRole.CopyApplicationIdentityRoleProperties(identityRole)); }