public void Delete(string year, string id) { var command = new DeleteCentre { Id = Guid.Parse(id), Year = year }; Domain.Dispatcher.SendCommand(command); }
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, }); }