예제 #1
0
 public GetRolesOutput UpdateRoles(UpdateRolesInput roleDataObjects)
 {
     return _userServiceImp.UpdateRoles(roleDataObjects);
 }
예제 #2
0
 public GetRolesOutput UpdateRoles(UpdateRolesInput input)
 {
     var roleDtos = this.PerformUpdateObjects<List<RoleDto>, RoleDto, Role>(input.Roles,
         _roleRepository,
         roleDto => roleDto.Id.ToString(),
         (r, roleDto) =>
         {
             if (!string.IsNullOrEmpty(roleDto.Name))
                 r.Name = roleDto.Name;
             if (!string.IsNullOrEmpty(roleDto.Description))
                 r.Description = roleDto.Description;
         });
     return new GetRolesOutput
     {
         Roles = roleDtos
     };
 }