Step 2: Create the ASP.NET Dynamic Data Project

If you haven’t already, read the article this example is based on or start at the beginning of this example.

In this example, I use ASP.NET Dynamic Data as a glorified – though still useful – “hello world”. It’s a way to know that everything is working between a Windows Azure web role and the SQL Azure database without having to write any code.

Add a new ASP.NET Dynamic Data Entities Web Application and call it CSSAdmin:


Copy the connectStrings element from App.Config of CSSModel to web.config of CSSAdmin:


In CSSAdmin references, right-click to add a reference to CSSModel:


In Global.asax.cs, follow the instructions in RegisterRoutes to uncomment the following line, changing YourDataContextType to CSSModel.CSSModelContainer and ScaffoldAllTables to true:


Right-click on CSSAdmin and select “Set as StartUp Project” then run it. The result is a website running on your local machine accessing a SQL Azure database in the cloud:


In the next step, I’ll show you how to get the website running in the cloud as well, but for now, go ahead and add a couple of Companies and a couple of Stories.

Continue to step 3.

Leave a Reply

Your email address will not be published. Required fields are marked *