我有以下代码:
[Produces("application/json")]
[Route("api/[controller]")]
public class MarketReportInstancesTableController : BaseController
{
internal readonly MyIRIntegrationDbContext Context;
public MarketReportInstancesTableController(ILogger<MarketReportInstancesTableController> logger,
MyIRIntegrationDbContext context) : base(logger)
{
Context = context;
}
[HttpGet (Name ="PageData")]
public IActionResult PageData([FromQuery] IDataTablesRequest request)
{
.... methd body in here
}
我尝试使用如下网址进行访问:
http://somehost/pca/api/MarketReportInstancesTable/pagedata
哪个不起作用,但是
http://somehost/pca/api/MarketReportInstancesTable/
确实有效。
我的问题是,为什么这条路线会这样做?我想在同一个WebAPI控制器中有很多路径。
我的处理方式有误吗?
慕娘9325324
相关分类