jaduff / LabLog

Software for recording physical users of computers in a lab environment.
MIT License
0 stars 1 forks source link

Attribute routes and tag helpers #32

Closed jaduff closed 6 years ago

jaduff commented 6 years ago

The Room action in the Admin controller has the attribute route definition of: [Route("Admin/{id}/{name?}/Room/{roomName}")]

I'm trying to create links in the School view that direct to that route. asp-controller="Admin" works fine. But before asp-action="Room", id and name need to be added.

Doing it the other way around seems to be easy. /Admin/Room/{id}/{roomName}, but having information between the controller and action is something I'm fighting with.

jaduff commented 6 years ago

Wait, fixed. Seems to be magical. Had an error in matching the parameters in the tag-helpers to the route.