Introduction

The following shows how easy it is to create simple web sites using the new Code First Entity Framework, SQL Compact Edition and Web Forms. It must be said that a number of parts of this solution are still beta, so expect the unexpected.

I won't go into either Code First Entity Framework or SQL Compact Edition but check out Scott Guthrie's (see references) articles as they are fabulous on both topics.

I am using Webforms initially because I find it a very quick building simple sites using ASP.NET webform controls.

The site I am starting to build in this article is a sporting website for social teams. We are only going to see the very simple aspects of the Person management, but I will add more features in future articles as I switch to MVC.

You'll find more articles like this at http://www.domscode.com

What you will get out of this

  1. An understanding of how easy it is to use Code First Entity Framework;
  2. How easy it is to use the integrated SQL Server
  3. How easy CRUD facility can be built with existing Webform controls

You will need:

  1. Visual Studio 2010 Professional or higher (C#)
  2. Microsoft ADO.NET Entity Framework Feature CTP4http://www.microsoft.com/downloads/en/details.aspx?FamilyID=4e094902-aeff-4ee2-a12d-5881d4b0dd3e&displaylang=en and
  3. Microsoft SQL Server CE 4.0 CTPhttp://www.microsoft.com/downloads/en/details.aspx?FamilyID=0d2357ea-324f-46fd-88fc-7364c80e4fdb&displaylang=en

Building the Application:

In Conclusion:

So this was pretty simple but I think you get the idea that you have quickly built, a simple, self contained CRUD web application, using a range of new tools.

References:

http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx
http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx