protected async Task processCommand(LeaveEvento command) { var evento = await base.repository.Get(command.Id) as Evento; evento.LeaveEvento(command.ParticipantId); await repository.Save(evento); }
protected async Task ProcessCommand(LeaveEvento command) { if (command == null) { throw new ArgumentNullException(nameof(command)); } var evento = await Repository.Get(command.Id) as Evento; evento.LeaveEvento(command.ParticipantId); await Repository.Save(evento); }
protected async Task ProcessCommand(LeaveEvento command) { if (command == null) { throw new ArgumentNullException(nameof(command)); } var evento = (await NonEventSourceRepository.GetEvent(command.Id)).ToDomainEvent(); evento.LeaveEvento(command.ParticipantId); await NonEventSourceRepository.LeaveEvent(evento.Id, command.ParticipantId); }
protected async Task ProcessCommand(LeaveEvento command) { if (command == null) { throw new ArgumentNullException(nameof(command)); } var evento = (await NonEventSourceRepository.GetEvent(command.Id)).ToDomainEvent(); evento.LeaveEvento(command.ParticipantId); await NonEventSourceRepository.UpdateEvent(evento, true); await notificationManager.NotifyParticipantsAsync((Notification.EventWithUserIds) evento.ToDataContractEvent(), Engaze.Core.DataContract.OccuredEventType.ParticipantLeft); }