Beispiel #1
0
 public void Handle(TournamentCreated e)
 {
     Tournaments.Add(new Tournament
     {
         Id   = e.Id,
         Year = e.Year
     });
 }
Beispiel #2
0
        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);
    }
Beispiel #4
0
 public void Apply(TournamentCreated evt)
 {
     Id      = evt.TournamentId;
     Created = true;
 }