我有一个带有以下API的MVC控制器:
public CustomObject Get([FromUri] float lat, [FromUri(Name="long")] float longitude, string userKey = null)
这可以,但需要兼容性垫片,因为不推荐使用FromUri.
如何使用适当的ASP.NET Core API复制longitude参数的"别名"行为?
c# asp.net-core
asp.net-core ×1
c# ×1