Example #1
0
        private void AddAgencyContact(AgencyContactDto agencyContactDto, Agency agency)
        {
            var staff = agencyContactDto.ContactStaff != null?_staffRepository.GetByKey(agencyContactDto.ContactStaff.Key) : null;

            var agencyContactType = _mappingHelper.MapLookupField <AgencyContactType> (agencyContactDto.AgencyContactType);

            var agencyContact =
                new AgencyContactBuilder().WithAgencyContactType(agencyContactType).WithContactStaff(staff).WithEffectiveStartDate(
                    agencyContactDto.EffectiveStartDate).WithStatusIndicator(agencyContactDto.StatusIndicator).Build();

            agency.AddContact(agencyContact);
        }