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

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

            yield return(new HotelDeleted
            {
                Id = tournament.Id,
                HotelId = command.Id,
            });
        }