public void Handle(PersonMoved message) { Person person = storage.Items <Person>().Where(p => p.Id == message.Id).Single(); person.Street = message.NewStreet; person.StreetNumber = message.NewNumber; storage.Update(person); }
public void Handle(PersonMoved message) { Person person = storage.Load <Person>(message.Id); person.Street = message.NewStreet; person.StreetNumber = message.NewNumber; storage.Update(person); }
private void Apply(PersonMoved @event) { this.currentAddress = new Address(@event.NewStreet, @event.NewNumber); }
public static void MovePerson(Vector3 pos) => PersonMoved?.Invoke(pos);