Пример #1
0
        public async Task <List <Contact> > DeleteContactAsync(List <Contact> listContact)
        {
            List <Contact> result = new List <Contact>();

            checkServiceCommunication();
            List <Contact> gateWayResultList = await _gateWayClient.DeleteContactAsync(listContact);

            if (gateWayResultList.Count == 0)
            {
                foreach (Contact contact in listContact)
                {
                    int returnResult = _dataSet.DeleteContact(contact.ID);
                    if (returnResult > 0)
                    {
                        result.Add(contact);
                    }
                }
            }
            return(result);
        }