/// <summary> /// Создать иностранного участника /// </summary> /// <returns>Идентификатор инстранного участника</returns> public ForeignParticipant Create() { var createdForeignParticipant = new ForeignParticipant(); _domainContext.ForeignParticipants.Add(createdForeignParticipant); return(createdForeignParticipant); }
public static ForeignParticipantResult ConvertToResult(ForeignParticipant foreignParticipant) { return(new ForeignParticipantResult { Id = foreignParticipant.Id, Passport = foreignParticipant.Passport == null ? null : ConvertToResult(foreignParticipant.Passport) }); }
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 }); }