Entity Framework Development Approaches
As shown in the following diagram, there are three ways you can work with data in the Entity Framework: Database First , Model First , and Code First. Database First If you already have a database, the Entity Framework can automatically generate a data model that consists of classes and properties that correspond to existing database objects such as tables and columns. The information about your database structure ( store schema ), your data model ( conceptual model ), and the mapping between them is stored in XML in an .edmx file. Visual Studio provides the Entity Framework designer, which is a graphical designer that you can use to display and edit the .edmx file. The sections Getting Started With the Entity Framework and Continuing With the Entity Framework in the Web Forms tutorial series use Database First development. Model First If you don't yet have a database, you can begin by creating a model using the Entity Framework designer in Visual Studio. Whe...