public void Consume(CarRegistered @event) { var carList = this.repository.Get(0) ?? new List <CarItem>(); carList.Add(new CarItem { Registration = @event.Registration }); this.repository.AddOrUpdate(0, carList); }
private void Handle(CarRegistered @event) { this.Registration = @event.Registration; }