Exemplo n.º 1
0
        public void Handle(PlayerCreatedEvent domainEvent)
        {
            var town = _townRepository.GetSmallestTown();

            town.AddCitizen();
            _townRepository.Update(town);

            domainEvent.Player.SetTown(town.Id);
            _playerRepository.Add(domainEvent.Player);
        }