public void Handle(TournamentCreated e) { Tournaments.Add(new Tournament { Id = e.Id, Year = e.Year }); }
private void Apply(TournamentCreated ev) { var data = ev.Data as TournamentData; _ctx_model.Id = data.Id; _ctx_model.Name = data.Name; _ctx_model.Created = data.Created; }
private async Task <bool> Handle(TournamentCreated evt) { var projection = new TournamentProjection( evt.TournamentId, evt.Name, Enumerable.Empty <Team>().ToImmutableList(), Fixture.Empty); await _projectionManager.UpdateProjection(this.GetPrimaryKey(), projection); return(true); }
public void Apply(TournamentCreated evt) { Id = evt.TournamentId; Created = true; }