8.13. Model-First Generation
EF4 allows you to create your entity model in Visual Studio and use it to generate and update database structure. At the time of writing, this works only with SQL Server. This facility is great for users unfamiliar with SQL or in situations where you do not have access to the database.
Create a new C# console project called Chapter8.ModelFirst.
Add a new ADO.NET Entity Data Model called CustomerModel.
Click Next.
Select "Empty model" (Figure 8-14) on the next step and click Finish.
Figure 8.14. Select the "Empty model" option
Open the newly created empty CustomerModel.edmx.
Right-click the design surface and select Add ...
Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.