I have an MVC Controller with the following API:
public CustomObject Get([FromUri] float lat, [FromUri(Name="long")] float longitude, string userKey = null)
This works, but requires the compatibility shim since FromUri is deprecated.
How do I replicate the "aliasing" behavior of the longitude parameter with proper ASP.NET Core API?
Use the Bind Attribute as an alternative solution
public CustomObject Get(float lat, [Bind(Prefix = "long")]float longitude, string userKey = null)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With