The upcoming release of Visual Studio 2010 will contain the
Entity Framework 4 which is Microsoft's second release of the Entity
Framework. The new and improved EF4 contains a boat load of new features which
many developers have suggested after using version 1. It also comes closer to
the features offered in other Object-Relational Mapping tools such as
NHibernate. Object-Relational Mapping tools are used to eliminate much of the
tedious code needed to have an application persist and retrieve data from a
database. The developer uses a visual interface to build classes that map to
tables, relationships, stored procedures, and other objects in a database. One
of the great new features of EF4 is the ability to create an ADO.NET Entity
Data Model and then build the database from the model. Previously the
developer needed to create the database first and then generate the model. EF4
still supports reverse engineering a database but being able to use Visual
Studio to design a database based off of an object model is a big step forward
with this tool.
The goal of this article is to show you how to create an
ADO.NET Entity Data Model using the Entity Framework 4. This article uses
Visual Studio 2010 Beta 2 so some of the steps may change once the final
version is released to production. Future articles will build upon this
application to dive deeper into the EF4 to demonstrate how to query and display
data, incorporate stored procedures, customize the classes generated by the
EF4, and much more.