ESSENCE
Make a rating based on beta version 5.0 for ASP.NET v5, either from source or a nightly build , as it includes the Routing attribute .
DETAIL
Merger
AttributeRouting was taken over by the ASP.NET v5 RTM platform in collaboration with package owner Tim McCall. v5 has been in beta since February 2013. See the ASP.NET Roadmap to the ASP.NET Documentation Site .
Custom Route Handlers
Parameter Limitations
Support for classes based on HttpVerbAttribute (examples from AttributeRoutingTest.cs ):
Parameter Type Constraints
[HttpGet("controller/{id:int}")] public string Get(int id) { ... }
Extra options
[HttpGet("optional/{opt1?}/{opt2?}")] public string Optional(string opt1 = null, string opt2 = null) { ... }
Default for attributes
[HttpGet("default/{default1=D1}/{default2=D2}")] public string Default(string default1, string default2) { ... }
Wildcard Options
[HttpGet("wildcard/{*wildcard}")] public string Wildcard(string wildcard) { ... }
source share