public IActionResult GetPostById(int id) { ConnectManager c = new ConnectManager(); Post post = c.GetPostById(id); if (post != null) { return(Ok(post)); } else { return(NotFound()); } }