public void When(SpaceUpdatedEvent @event) { Name = @event.Name; Visibility = @event.Visibility; BackgroundImage = @event.BackgroundImage; LastModificationTime = @event.OccurrenceTime; }
public async Task Handle(SpaceUpdatedEvent notification, CancellationToken cancellationToken) { var space = await _readModelRepository.GetAsync <SpaceDetail>(notification.AggregateId); space.When(notification); await _readModelRepository.UpdateAsync(space); }
private void When(SpaceUpdatedEvent @event) { _name = @event.Name; _backgroundImage = @event.BackgroundImage; _visibility = @event.Visibility; }