internal static LG.Data.Models.Shared.EmailAddress ReturnEmailAddress(LG.Services.EMS.BEntity entity) { return(entity.EmailAddresses.Any() ? new LG.Data.Models.Shared.EmailAddress() { Email = entity.EmailAddresses.First().Email, Id = entity.EmailAddresses.First().ID.HasValue ? entity.EmailAddresses.First().ID.Value : 0, EmailUsageEnum = entity.EmailAddresses.First().EmailAddressUsages.First().EmailAddressUsageEnum, IsPrimary = entity.EmailAddresses.First().EmailAddressUsages.First().IsPrimary } : new LG.Data.Models.Shared.EmailAddress()); }
internal static LG.Data.Models.Shared.PhoneBase ReturnPhone(LG.Services.EMS.BEntity entity) { return(entity.Phones.Any() ? new LG.Data.Models.Shared.PhoneBase() { PhoneId = (!(!entity.Phones.First().ID.HasValue || entity.Phones.First().ID == null) ? entity.Phones.First().ID.Value : 0), PhoneNumber = entity.Phones.First().PhoneNumber, CountryCode = entity.Phones.First().PhoneCountryCode, PhoneExtension = entity.Phones.First().PhoneExtension, PhoneUsageEnum = entity.Phones.First().PhoneUsages.First().PhoneUsageEnum, IsPrimary = entity.Phones.First().PhoneUsages.First().IsPrimary } : new LG.Data.Models.Shared.PhoneBase()); }