public void AddPlayer(Guid id) { var @event = new PlayerAddedToCompetition { PlayarId = id }; Apply(@event); Append(@event); }
public void Handle(PlayerAddedToCompetition command) { _eventStorage.Append <AggregateRoot>(command.RootId, new Event[] { command }); }
private void Apply(PlayerAddedToCompetition @event) { _players.Add(@event.PlayarId); }