ASP.NET Dynamic Data Wizard - Generating LINQ To SQL Data Model and Custom Pages

At the recent presentations I did at the Sarasota .NET Developer Group I talked about ASP.NET Dynamic Data Websites, but did not have a chance to speak about the new ASP.NET Dynamic Data Preview on Code Gallery that was released the day before.

The new ASP.NET Dynamic Data Preview includes a new ASP.NET Dynamic Data Website Wizard that guides you through creating a LINQ To SQL Data Model and customizing pages. Now when you create a new website project you are introduced to a new project template, called Dynamic Data Website Wizard.

 

Dynamic Data Website Wizard

 

Choosing the new Dynamic Data Website Wizard project starts off a wizard that guides you through the creation of you LINQ To SQL DataContext by first asking you for a database connection to create your new model. Below I am picking a Northwind Database Connection to use to generate by LINQ To SQL Classes File and DataContext.

 

Dynamic Data Database Connection

 

Once you provide a valid database connection, the ASP.NET Dynamic Data Wizard reads the database schema and asks you which tables, views, stored procedures, and user-defined functions you want to include in the model. Just check and uncheck at will.

 

Dynamic Data Model

 

Once you pick all the necessary items, you then choose which custom pages you want generated in your website.

 

Dynamic Data Custom Page Generation

 

After you choose those custom pages you want generated by the ASP.NET Dynamic Data Wizard, you can further customize those generated pages by specifying if you want insert and edit capabilities as well as which fields you want to be included in the List Page.

 

Dynamic Data Customize Generated Pages

 

Dynamic Data Custom Fields

 

After the ASP.NET Dynamic Data Wizard is complete, it generates all the custom pages, LINQ To SQL Data Classes ( Northwind.dbml ), as well as Partial Metadata Classes ( NorthwindDataContextParialClass.cs ) for each class generated in the LINQ To SQL Classes File.

 

ASP.NET Dynamic Data Solution

 

In essence, if you find that you need to create custom pages for each LINQ To SQL Class, it is best to run the ASP.NET Dynamic Data Wizard to jumpstart your development. It will guide you through those customizations via a wizard so you don't have to create all the custom folders and pages manually which would be quite a bit of work.

 

ASP.NET Dynamic Data Tutorials

 

posted on Saturday, April 19, 2008 5:00 PM

Main

News

Green Tea

.NET Development

Enterprise Library

Patterns & Practices