In sample code, it's public IActionResult GetProduct(int id) { ... } But next line, it says The ProductsApi.GetProducts(int) , So update it to ProductsApi.GetProduct(int)