The latest tools for ASP.NET MVC 3 make it extremely easy to
get started with a data driven application starting with code. You can quickly
create a model in C#, provide a few simple annotations to specify key values,
display names, and validation constraints, and then simple but functional data
management screens are a few clicks away. The result, while easy to produce,
is generally good code (though it would be a better design not to call the data
context directly from the controller, but rather to inject it via an
IRepository interface) that can easily be tailored to suit production
requirements.
Download
the sample code for this article here.