public async Task <IActionResult> Get(string id) { try { IActionResult actionResult = await base.GetEntity <AgentViewModel>(id); OkObjectResult okResult = actionResult as OkObjectResult; if (okResult != null) { AgentViewModel view = okResult.Value as AgentViewModel; view = _agentManager.GetAgentDetails(view); } return(actionResult); } catch (Exception ex) { return(ex.GetActionResult()); } }