Пример #1
0
        /// <summary>
        /// Создать иностранного участника
        /// </summary>
        /// <returns>Идентификатор инстранного участника</returns>
        public ForeignParticipant Create()
        {
            var createdForeignParticipant = new ForeignParticipant();

            _domainContext.ForeignParticipants.Add(createdForeignParticipant);

            return(createdForeignParticipant);
        }
Пример #2
0
 public static ForeignParticipantResult ConvertToResult(ForeignParticipant foreignParticipant)
 {
     return(new ForeignParticipantResult
     {
         Id = foreignParticipant.Id,
         Passport = foreignParticipant.Passport == null ? null : ConvertToResult(foreignParticipant.Passport)
     });
 }
Пример #3
0
        public static ForeignParticipantResult ConvertToResult(
            ForeignParticipant foreignParticipant,
            PassportResult passportResult)
        {
            Contract.Argument.IsNotNull(foreignParticipant, nameof(foreignParticipant));
            Contract.Argument.IsNotNull(passportResult, nameof(passportResult));

            return(new ForeignParticipantResult
            {
                Id = foreignParticipant.Id,
                AlienId = foreignParticipant.AlienId,
                InvitationId = foreignParticipant.InvitationId,
                Passport = passportResult
            });
        }