IF you don't mind adding a method alongside each action in your controller for which you want to generate URLs you can proceed as follows. This has some downsides compared to your lambda expression approach but some upsides too.
Implementation:-
Add this to your Controller for EACH action method for which you want strongly-typed url generation ...
// This const is only needed if the route isn't already mapped
// by some more general purpose route (e.g. {controller}/{action}/{message}
public const string SomeMethodUrl = "/Home/SomeMethod/{message}";
// This method generates route values that match the SomeMethod method signature
// You can add default values here too
public static object SomeMethodRouteValues(MessageObject messageObject)
{
return new { controller = "Home", action = "SomeMethod",
message = messageObject };
}
You can use these in your route mapping code ...
Routes.MapRoute ("SomeMethod",
HomeController.SomeMethodUrl,
HomeController.SomeMethodRouteValues(null));
And you can use them EVERYWHERE you need to generate a link to that action:-
e.g.
<%=Url.RouteUrl(HomeController.SomeMethodValues(new MessageObject())) %>
If you do it this way ...
1) You have just one place in your code where the parameters to any action are defined
2) There is just one way that those parameters get converted to routes because Html.RouteLink and Url.RouteUrl can both take HomeController.SomeMethodRouteValues(...) as a parameter.
3) It's easy to set defaults for any optional route values.
4) It's easy to refactor your code without breaking any urls. Suppose you need to add a parameter to SomeMethod. All you do is change both SomeMethodUrl and SomeMethodRouteValues() to match the new parameter list and then you go fix all the broken references whether in code or in Views. Try doing that with new {action="SomeMethod", ...} scattered all over your code.
5) You get Intellisense support so you can SEE what parameters are needed to construct a link or url to any action. As far as being 'strongly-typed', this approach seems better than using lambda expressions where there is no compile-time or design-time error checking that your link generation parameters are valid.
The downside is that you still have to keep these methods in sync with the actual action method (but they can be next to each other in the code making it easy to see). Purists will no doubt object to this approach but practically speaking it's finding and fixing bugs that would otherwise require testing to find and it's helping replace the strongly typed Page methods we used to have in our WebForms projects.