Open the Solution Explorer, right-click on the solution name, and select
Add ??? New Item from the context menu.
When the Add New Item dialog appears, select the ADO.NET Entity Data Model template
(see Figure B-1).
Figure B-1
Name the data model ProductSales and click Add. This launches the Entity Data Model Wizard. The
first page of the wizard asks you to select the source that the model contents will come from. You can
choose to generate a model from a database or to create an empty model.
If you choose to create an empty model, the Finish button appears. Click it, and an empty model is
created, in which you can build a model manually using XML.
This example, however, won??™t put you through that, so select the Generate From Database option
(see Figure B-2) and click Next.
The next page of the wizard lets you choose or create your data connection to the data store. Because no
connection has been created, click the New Connection button to open the Connection Properties dialog
(see Figure B-3).
In this dialog, select the server from which the Entity Framework will make its connection.
Pages:
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518