Beispiel #1
0
        public async Task <IdentityResult> CreateAsync(ApplicationRole role, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();
            var result = await objRole.AddRole(role);

            return(result);
        }
Beispiel #2
0
 public async Task AddToRoleAsync(ApplicationUser user, string roleName, CancellationToken cancellationToken)
 {
     cancellationToken.ThrowIfCancellationRequested();
     role.RoleName = roleName;
     role.UserId   = user.ID;
     await objRole.AddRole(role);
 }