As we start down the code first path, there are a couple of things that could be true. If we already have a database, then we will need to configure our objects to that schema, but what if we do not have one? That is the subject of this recipe, creating a database from the objects we declare.
We will be using NuGet Package Manager to install the Entity Framework 4.1 assemblies.
The package installer can be found at http://www.nuget.org/.
Open the Creating a Database from Code solution in the included source code examples.
using System.Data.Entity; using System.Linq; ...