public async Task <IActionResult> Connect(string agentID, [FromQuery] ConnectAgentViewModel request)
        {
            try
            {
                Guid entityId = new Guid(agentID);

                ConnectedViewModel connectedViewModel = new ConnectedViewModel();
                var requestIp = _accessor.HttpContext.Connection.RemoteIpAddress.ToString();
                var agent     = _agentManager.GetConnectAgent(agentID, requestIp, request);

                if (agent == null)
                {
                    return(NotFound());
                }

                if (agent.IsConnected == false)
                {
                    JsonPatchDocument <Agent> connectPatch = new JsonPatchDocument <Agent>();

                    connectPatch.Replace(e => e.IsConnected, true);
                    await base.PatchEntity(agent.Id.ToString(), connectPatch);
                }

                return(new OkObjectResult(connectedViewModel.Map(agent)));
            }
            catch (Exception ex)
            {
                return(ex.GetActionResult());
            }
        }