📜  查询参数发送到控制器动作 asp.net 核心 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:21.840000             🧑  作者: Mango

代码示例1
// GET api/user/firstname/lastname/address
[HttpGet("{firstName}/{lastName}/{address}")]
public string GetQuery(string id, string firstName, string lastName, string address)
{
    return $"{firstName}:{lastName}:{address}";
}