Open jods4 opened 8 years ago
Hi @jods4, I have to read up some more on the core docs before I can make a proper extension for the new routing apis so this probably won't be included until Typewriter 2.x. I've added support for the [controller] and [action] tokens in the current implementation so you should be able to use them at least.
@frhagn Thanks! In the meantime I'm using my own $ActionRoute
method, which contains the minimum needed to support our patterns (we do use HttpGet("{id}")
for example).
I think the official doc is not ready yet <_< https://docs.asp.net/en/latest/mvc/controllers/routing.html
I know Core is not officially supported yet, but it works fine enough for me.
That said, the attributed routing in ASP.NET Core supports additional variants that don't exist in 4.5. It would be nice if Typewriter could support them in its Web API extensions, i.e.
$Url
.In particular, all http attributes (
HttpGet
& co) implementIRouteTemplateProvider
and are used to indicate routes. Also, apparently[controller]
is the new{controller}
...Correct route above would be
GET api/frob/bar
.