Building an ad hoc admin website with ASP.NET Dynamic Data 4

I wanted to create an admin website using which I could easily add new data or modify existing data to an existing set of tables. For simple data models, ASP.NET Dynamic Data 4 provides a quick solution.

Create an ASP.NET Dynamic Data Entities website in Visual Studio 2010 (you can use Linq to SQL if that’s what you prefer). Add an Entity Framework Data Model. Add the tables you want to use in your model.

Application Class Diagram

Entity Model

Register your model in the Global.asax file as follows:

DefaultModel.RegisterContext(typeof(DHACoreModel.DHACoreEntities),
                                        new ContextConfiguration()
{
   ScaffoldAllTables = true
});

Run the website and with just one line of code you get the admin pages.

Page with the list of tables

Home page with list of tables

List page for EntityColumns

List Page for EntityColumn

Insert Page for EntityColumn

Insert Page for EntityColumn

Edit Page for EntityColumn

Edit Page for EntityColumn

Advertisements

One thought on “Building an ad hoc admin website with ASP.NET Dynamic Data 4

  1. Pingback: DynamicData – Changing Foreign-Key DropDownList display column and format « Rounded Corners

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s