In my ASP.NET MVC controller classes I have action methods.
In my views I have Html.ActionLinks that have the names of those action methods set as their actionName values.
A typo in either of these locations will break things. Are there any tools that can check my controllers and views for validity in this manner?
In the mvc futures assembly there are overloads of ActionLink that take an expression e.g.:
These can be checked at compile time and are ‘refactoring friendly’.
You will need to follow a couple of extra steps to force Visual Studio to compile your views so you get an error when the names don’t match up (details here)