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