更新时间:2023-02-17 09:21:03
您可以使用 [FromQuery]
将特定模型绑定到查询字符串:
You can use [FromQuery]
to bind a particular model to the querystring:
https://docs.microsoft.com/en-us/aspnet/core/mvc/models/model-binding
例如
[HttpGet()]
public IActionResult Get([FromQuery(Name = "page")] string page)
{...}