是否可以在不指定[controller]参数的情况下测试多个api控制器
像下面一样,只写/api,测试ValuesController和WeatherForecastController。两者都是HttpGet,不需要任何参数。
答案 0 :(得分:0)
不幸的是,您的屏幕截图信息量不大,我的期望是在单个 API 端点上不能有 2 个控制器,它们需要不同。
如果你的代码中有这样的东西:
[Route("api/[controller]")]
那么你应该可以访问:
/api/ValuesController
/api/WeatherForecastController
更多信息: