public GetRolesOutput UpdateRoles(UpdateRolesInput roleDataObjects) { return _userServiceImp.UpdateRoles(roleDataObjects); }
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 }; }