Exemplo n.º 1
0
 public IActionResult GetAllAgents()
 {
     try
     {
         var agents        = serviceAgent.GetAgents();
         var agentResource = mapper.Map <IEnumerable <AgentResource> >(agents);
         return(Ok(agentResource));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }