This project is read-only.

T4MVC: a T4 template for ASP.NET MVC

T4MVC has been moved to its own project:

Note that T4MVC is still part of MvcContrib, but was moved to a separate CodePlex project for convenience.

Last edited Apr 12, 2012 at 7:27 PM by davidebbo, version 13


jorgy343 Sep 28, 2011 at 10:35 PM 
Will T4MVC's features ever be integrated into MVC itself? I fail to see the reasoning as to why MVC is promoting the use of magic strings when many of the T4MVC features can easily be built directly into MVC.

4eburek Aug 8, 2011 at 12:11 AM 
T4MVC Version 2.6.61
Need to replace "new RouteValueDictionary" with not empty parameters to
This hepler added in MVC3 and in addition to create RouteValueDictionary replaces "_" to "-" (i.e. it is useful to create "data-*" attributes in HTML5)

Skorunka Mar 24, 2011 at 5:14 PM 
@akronite: Since T4MVC Version 2.6.44 add code after line 387(after: protected <#=controller.ClassName #>(Dummy d) { })

akronite Jan 11, 2011 at 8:30 AM 
As for those who using MVC 3, for completeness you could add this:

[<#= GeneratedCode #>, DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToActionPermanent(ActionResult result) {
var callInfo = result.GetT4MVCResult();
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);

inside under line 379

esenciadev May 8, 2010 at 3:35 AM 
We've been using T4MVC quite a bit in a large MVC2 project we're working on, and recently posted an article on how to take advantage of it's features in a project with controllers shared through multiple areas -