The ASP.NET MVC framework relies on scaffolding to generate most of what you need for an ASP.NET MVC including views and controllers. The standard scaffolding templates would suffice for most projects, but there will be cases where you would require finer grain control over the code that is generated.
Visual Studio uses T4 templates internally to generate many of the item templates available, and developers are also able to harness this functionality in their own projects.
In this chapter, we will explore the following topics:
An overview of scaffolding
T4 templates
Tools available for making the use of T4 easier
A brief overview of the T4 syntax
Customizing the generated code for controllers and views
Creating a custom scaffolder