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

            Domain.Dispatcher.SendCommand(command);
        }
Ejemplo n.º 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,
            });
        }