Beispiel #1
0
        public virtual async Task <IdentityRoleDto> UpdateAsync(Guid id, IdentityRoleUpdateDto input)
        {
            var role = await RoleManager.GetByIdAsync(id);

            role.ConcurrencyStamp = input.ConcurrencyStamp;

            (await RoleManager.SetRoleNameAsync(role, input.Name)).CheckErrors();

            role.IsDefault = input.IsDefault;
            role.IsPublic  = input.IsPublic;

            input.MapExtraPropertiesTo(role);

            (await RoleManager.UpdateAsync(role)).CheckErrors();
            await CurrentUnitOfWork.SaveChangesAsync();

            return(ObjectMapper.Map <IdentityRole, IdentityRoleDto> (role));
        }
Beispiel #2
0
 public virtual Task <IdentityRoleDto> UpdateAsync(Guid id, IdentityRoleUpdateDto input)
 {
     return(RoleAppService.UpdateAsync(id, input));
 }