Let’s begin by creating a new ASP.NET Web Application Project.
My previous two EF “code first” blog posts used ASP.NET MVC – for this blog
post I’ll use ASP.NET Web Forms. Note that all of the EF concepts are
identical regardless of whichever type of ASP.NET application you use.
We’ll use “File->New Project” within VS 2010 (or the free
Visual Web Developer 2010 Express) and choose the “ASP.NET Web application”
project template to create the new application.
The new “ASP.NET Web Application” project in VS 2010 is a
nice starter template that provides a default master-page layout with CSS
design (I blogged about this new starter project template in a previous blog post).
When it is created you’ll find it contains a few default files within it:
We don’t need these default files (we could instead just use
the “Empty ASP.NET Web Application” project template) – but they’ll make our
simple app look a little prettier by default so we’ll use them.