Example #1
0
        protected async Task processCommand(DeleteEvento command)
        {
            var evento = await base.repository.Get(command.Id) as Evento;

            evento.DeleteEvent();
            await repository.Save(evento);
        }
Example #2
0
        protected async Task ProcessCommand(DeleteEvento command)
        {
            if (command == null)
            {
                throw new ArgumentNullException(nameof(command));
            }

            var evento = await Repository.Get(command.Id) as Evento;

            evento.DeleteEvent();
            await Repository.Save(evento);
        }
        protected async Task ProcessCommand(DeleteEvento command)
        {
            if (command == null)
            {
                throw new ArgumentNullException(nameof(command));
            }

            var evento = (await NonEventSourceRepository.GetEvent(command.Id)).ToDomainEvent();

            evento.DeleteEvent();
            await NonEventSourceRepository.DeleteAsync(evento.Id);
        }
Example #4
0
        protected async Task ProcessCommand(DeleteEvento command)
        {
            if (command == null)
            {
                throw new ArgumentNullException(nameof(command));
            }

            var evento = (await NonEventSourceRepository.GetEvent(command.Id)).ToDomainEvent();

            evento.DeleteEvent();
            await NonEventSourceRepository.DeleteAsync(evento.Id);

            await notificationManager.NotifyParticipantsAsync((Notification.EventWithUserIds) evento.ToDataContractEvent(), Engaze.Core.DataContract.OccuredEventType.EventoDeleted);
        }