Пример #1
0
        public async Task <List <Provider> > DeleteProviderAsync(List <Provider> listProvider)
        {
            List <Provider> result = new List <Provider>();

            checkServiceCommunication();
            List <Provider> gateWayResultList = await _gateWayItem.DeleteProviderAsync(listProvider);

            if (gateWayResultList.Count == 0)
            {
                foreach (Provider provider in listProvider)
                {
                    int returnValue = _dataSet.DeleteProvider(provider.ID);
                    if (returnValue > 0)
                    {
                        result.Add(provider);
                    }
                }
            }
            return(result);
        }