Exemplo n.º 1
0
    public async Task Handle(UserRolesUpdatedEvent notification, CancellationToken cancellationToken)
    {
        var user = await _readModelRepository.GetAsync <UserDetail>(notification.AggregateId);

        user.When(notification);

        await _readModelRepository.UpdateAsync(user);
    }
Exemplo n.º 2
0
 private void When(UserRolesUpdatedEvent @event)
 {
     _roles = @event.Roles.ToList();
 }
Exemplo n.º 3
0
 public void When(UserRolesUpdatedEvent @event)
 {
     Roles = @event.Roles.ToArray();
 }