示例#1
0
        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);
        }
示例#2
0
 private void Handle(CarRegistered @event)
 {
     this.Registration = @event.Registration;
 }