Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

New Comment on "Attribute routing in Web API"

$
0
0
@NaturalCause - don't worry, tim's attribute routing won't be changed in any way. It should still work just fine. You can keep using that if you like it better. @Damian - You can do something like this: [HttpGet("countries/{name?}")] public Country GetCountry(string name = "USA") { } and that should work fine. That way it's typed as a C# primitive. Is that similar enough to what you had in mind?

Viewing all articles
Browse latest Browse all 7925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>