May 1st is labor day, and hard work is honored by doing nothing in most countries.
So my blog this month will require very little effort, if you have built a Store Module Entity Model Class Library with me last month.
Dynamic data is a Scaffold builder, something that exists for a long time in the Ruby on Rails framework.
Basically, a scaffold is an autogenerated set of the CRUD fonctionnalities (Add, Update, Delete, get details, etc).
Combining Dynamic Date with Entity Framework (you might also do this with a Linq Model),
will allow navigating between related tables.
To make it easier and lazy (it's may 1st), we'll do this in a web application outside DotNetNuke.
We will not focus on style sheets, conflicting web.config, packaging into a module, etc.
Prerequisities :
A DotNetNuke Website with Store installed,
framework 3.5 SP1,
the Entity Framework Store Model we built last month..
1. Create a new project outside de DotNetNuke

2. Select a "web application Entities Dynamic Data"
3. Add a reference to the Store Model Class Library (my previous blog)


4. Add a reference to "System.Data.Entity"
5. Open Global.asax.vb and uncomment the model context registration line
Intellisense should help you find the model : model.RegisterContext(GetType(StoreModel.StoreEntities).
Also set ScaffoldAllTables = True in the same line.

6. Copy and paste the familiar DNN connectionstring section into the web.config. See my last blog for the Entity Framework additional line.

7. Register the website in iis and Build.
8. Enjoy your may 1st labor day.




Note the related entities which you can easily browse (CartItems, Categories, Reviews)

My selection of burgundies. You might have selected a Champagne as well.