Being new to ASP.NET MVC, I\'ve been wondering about the signature of Controller methods. In all the examples I\'ve seen, they always seem to return ActionResult, even if th
Yep I have Sanderson's book, and I liked that part about being specific, as that was something vexing me when I was looking at other controller action examples. My philosophy even b4 learning MVC was that since functions (methods that return a value) should be treated as if you were declaring a variable/be substitutable in context for a variable/ref of the same type, be specific about the type, as you would if declaring a var (think of it as wanting to avoiding defnining all your variables as type "Object" in an app - more robust, but you lose some design-time checking and type safety). Facilitates a controller unit test for the correct return type as well.
For related reference, check out Listkov's Substitution Principle (the "L" in "SOLID") also.