public async Task Handle(UserRolesUpdatedEvent notification, CancellationToken cancellationToken) { var user = await _readModelRepository.GetAsync <UserDetail>(notification.AggregateId); user.When(notification); await _readModelRepository.UpdateAsync(user); }
private void When(UserRolesUpdatedEvent @event) { _roles = @event.Roles.ToList(); }
public void When(UserRolesUpdatedEvent @event) { Roles = @event.Roles.ToArray(); }