Take the standard return statement for a controller:
return View("Index");
is there a way to make this thing compile time safe? using static reflection or some other trick?
Yes; you're looking for this.
T4MVC is a T4 template for ASP.NET MVC apps that creates strongly typed helpers that eliminate the use of literal strings when referring to controllers, actions and views. It helps make your MVC code much more maintainable, and gives you intellisense where you normally would not have any.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With