Example #1
0
        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());
        }
Example #2
0
        public static ApplicationRole ToApplicationRole(this ApplicationIdentityRole identityRole)
        {
            if (identityRole == null)
            {
                return(null);
            }
            var applicationRole = new ApplicationRole();

            return(applicationRole.CopyApplicationIdentityRoleProperties(identityRole));
        }