예제 #1
0
        /// <summary>
        /// Contact Get
        /// </summary>
        public async Task <IEnumerable <ContactDto> > ContactGet(string contactGuid, string serviceGroupGuid)
        {
            var contacts = await ContactInfo.ContactGet(contactGuid, serviceGroupGuid);

            var result = contacts.Select(c => JsonDataExtensions.JsonToEntityData <ContactDto>(c.contact_info)).ToList();

            if (string.IsNullOrEmpty(contactGuid) || !result.Any())
            {
                return(result);
            }

            var account = await ContactBankAccountGet(null, contactGuid, serviceGroupGuid);

            result[0].contact_bank_account_guid = account.Select(a => a.contact_bank_account_guid).FirstOrDefault();
            return(result);
        }