Пример #1
0
 public static UpdateParticipantRequest MapToParticipantRequest(ParticipantDto participant)
 {
     return(new UpdateParticipantRequest
     {
         Fullname = participant.Fullname,
         FirstName = participant.FirstName,
         LastName = participant.LastName,
         ContactEmail = participant.ContactEmail,
         ContactTelephone = participant.ContactTelephone,
         DisplayName = participant.DisplayName,
         Representee = participant.Representee,
         Username = participant.Username,
         LinkedParticipants = LinkedParticipantToRequestMapper
                              .MapToLinkedParticipantRequestList(participant.LinkedParticipants)
     });
 }
        public static ParticipantRequest MapToParticipantRequest(ParticipantDto participant)
        {
            var request = new ParticipantRequest
            {
                Name               = participant.Fullname,
                Username           = participant.Username,
                FirstName          = participant.FirstName,
                LastName           = participant.LastName,
                ContactEmail       = participant.ContactEmail,
                ContactTelephone   = participant.ContactTelephone,
                DisplayName        = participant.DisplayName,
                UserRole           = GetUserRole(participant.UserRole),
                HearingRole        = participant.HearingRole,
                CaseTypeGroup      = participant.CaseGroupType.ToString(),
                ParticipantRefId   = participant.ParticipantId,
                Representee        = participant.Representee,
                LinkedParticipants = LinkedParticipantToRequestMapper
                                     .MapToLinkedParticipantRequestList(participant.LinkedParticipants)
            };

            return(request);
        }