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

            return(applicationRole.CopyIdentityRoleProperties(identityRole));
        }