public void Delete(string year, string id)
        {
            var command = new DeleteCentre
            {
                Id   = Guid.Parse(id),
                Year = year
            };

            Domain.Dispatcher.SendCommand(command);
        }
示例#2
0
        public IEnumerable Handle(Func <Guid, TournamentAggregate> al, DeleteCentre command)
        {
            var tournament = CommandQueries.GetTournaments().FirstOrDefault(x => x.Year == command.Year);
            var agg        = al(tournament.Id);

            yield return(new CentreDeleted
            {
                Id = tournament.Id,
                CentreId = command.Id,
            });
        }