I've inherited a kludgy and buggy MVC code base from another developer, and I'm trying to clean it up. One thing that would be very helpful would be a tool to check, at compile time, for links that don't correspond to action methods in a controller.
For instance, you can write an action method like this:
public ActionResult InsertAccount(string Name)
and there could be a link somewhere that looks like this:
/SomeController/InsertAccount?Id=Foo
Somewhere along the way, the parameter got changed from "Id" to "Name", and this breaks the link. If everything were in C#, the compiler would catch it, but because the link is generated from strings, a change like this can't be detected.
Is there any tool that would do this, or guidelines for link construction to preserve name safety, so I can use the compiler to catch this kind of problem?