Skip to content
Aug 29 / davidalpert

ASP.NET MVC Preview 5: string-based routes make sense once more

So Phil Haack responded to a comment on his blog and i suddenly feel a bit
silly.

Looks like creating a static helper class that exposes static strings will work as a way to centralize route names and refactor string literals out of my ActionNameAttributes.

I should have thought of that but i was blinded by the shiny newness of lambda expressions – they just look like so much fun!

In any case the new ActionName attribute and the associated separation between my route URLs and my action names looks clean and clever after all.

ASP.NET MVC, my new best friend, has come through once again.

Leave a comment