/// <summary> /// Выполнить команду /// </summary> /// <param name="foreignParticipantId">Идентификатор иностранного участника</param> /// <returns>Информация об иностранном участнике</returns> public async Task <ForeignParticipantResult> ExecuteAsync(Guid foreignParticipantId) { Contract.Argument.IsNotEmptyGuid(foreignParticipantId, nameof(foreignParticipantId)); var foreignParticipant = await _foreignParticipantRepository.GetAsync(foreignParticipantId); return(DomainEntityConverter.ConvertToResult(foreignParticipant: foreignParticipant)); }
/// <summary> /// Выполнить команду /// </summary> /// <param name="foreignParticipantId">Идентификатор иностранного участника</param> /// <returns>Информация об иностранном участнике</returns> public async Task <ForeignParticipantResult> ExecuteAsync(Guid foreignParticipantId) { Contract.Argument.IsNotEmptyGuid(foreignParticipantId, nameof(foreignParticipantId)); var foreignParticipant = await _foreignParticipantRepository.GetAsync(foreignParticipantId).ConfigureAwait(false); var passportResult = await _passportReadCommand.ExecuteAsync(foreignParticipant.PassportId).ConfigureAwait(false); return(DomainEntityConverter.ConvertToResult( foreignParticipant: foreignParticipant, passportResult: passportResult)); }