I suspect I can figure this out on my own after using the framework for a bit, but I was wondering if anyone had developed a web.config based routing implementation?
Something like:
<routing>
<route command="EditEmployee" controller="Employee" action="Edit"/>
<route command="AddEmployee" controller="Employee" action="Add"/>
<route command="JumpTo" controller="Default" action="JumpTo"/>
</routing>
In which we're no longer mapping directly to controllers and we standardize the code in the global.asax. I know the current implementation has a pass-through nature in the controllerName/actionName/id pattern, but I'm wondering if we can't entirely abstract the pattern away from code and put it into the config file.
So if someone wants to map it differently, they can...including putting the pattern into configuration:
<routing pattern="{controller}/{action}/{id}" mapped="false" />
or
<routing pattern="{command}" mapped="true">
<map command="EditEmployee" controller="Employee" action="Edit"/>
</routing>
Am I crazy?
David C.