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