Ejemplo n.º 1
0
        public async Task <List <Agent> > DeleteAgentAsync(List <Agent> listAgent)
        {
            List <Agent> result = new List <Agent>();

            checkServiceCommunication();
            List <Agent> gateWayResultList = await _gateWayAgent.DeleteAgentAsync(listAgent);

            if (gateWayResultList.Count == 0)
            {
                foreach (Agent agent in gateWayResultList)
                {
                    int returnResult = _dataSet.DeleteAgent(agent.ID);
                    if (returnResult > 0)
                    {
                        result.Add(agent);
                    }
                }
            }

            return(result);
        }