Skip to content

Changes in ASP.NET MVC 3 Tools Update

13 April 2011

Following changes was made in ASP.NET MVC 3 Tools Update since the ASP.NET MVC 3 RTM release.

“Add Controller” now scaffold¹ controllers with views and data access code

in Solution Explorer right-click the Controllers folder, click Add, and then Controller

new Controller dialog box

new Controller dialog box

Three scaffolding templates available by default.

  • Empty Controller (contents is obvious, eh?)
  • Controller with empty read/write actions
  • Has required action generated with all the methods but no implementation.
  • Controller with read/write actions and views, using Entity Framework
    • generates code such as
      • Data access – reads and writes entities in a database
      • Validation.  – form submissions validation according to rules declared on a model class.
      • One-to-many relationships.  – defined one-to-many foreign-key relationships between model classes will produce code for drop-down lists with related entities.

Choices for Data Context class:

  • With no existing data context class, choose <New data context…>” and a context class will then be generated for you.
  • Choice for Code First use with an existing data context class.
  • Object context class for using Database First or Model First.

In Advanced Options further options for the generated views could be specified. For example, the layout or master page to use.

“ASP.NET MVC 3 New Project” Dialog Box

"ASP.NET MVC 3 New Project" Dialog Box

"ASP.NET MVC 3 New Project" Dialog Box

New “Intranet Project” Template contains settings for building a web application using Windows authentication instead of forms authentication. Some settings depending on IIS that cannot be set here are described into a readme file. Documentation about this template is here.

Templates are now HTML5 enabled – selecting this option will generate in views source new HTML5 <header>, <footer>, and <navigation> elements.

Modernizr 1.7 – this is a JavaScript library allowing CSS 3/HTML5 support for in browsers not capable to handle them. More about Modernizr…

Updated versions of

  • jQuery 1.5.1
  • jQuery Validation 1.8
  • jQuery UI 1.8.11

Libraries are included as pre-installed NuGet packages.

ADO.NET Entity Framework 4.1

It includes the Code First feature and is part of a pre-installed NuGet package. Code First is an alternative to the existing Database First and Model First patterns. More about Code First and Code First Tutorials.

MVC 3 release note

________

¹ Scaffolding is a quick code generation of a controller and views

Advertisements

From → ASP.NET, MVC

One Comment

Trackbacks & Pingbacks

  1. MVC 3: Intranet Application template « ValueType

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: