If the connection test is successful, click OK.
Expand the new connection node in Server Explorer, and then expand the Tables and Stored Procedures
nodes for the Fabrikam connection. Now drag and drop all the tables into the Entities pane of the O/R
Designer. Next, drag all the stored procedures into the Methods pane of the O/R designer. Figure A-2
shows what the O/R Designer should look like when you??™re done.
Once you have added all of the objects, save the designer. As you know, the DataContext object and all
mappings have now been created and you can now start writing code to access these entities.
When you dropped the first object onto the O/R Designer, it asked you whether you wanted to store the
connection information. If you selected Yes, go back to the App.Config file and look at the information
315
Appendix A: Case Study
LINQ added. There is a new
section in which the connection to the Fabrikam
database is stored. Pretty nifty.
Figure A-2
You are now ready to start designing the UI. The first step is to create the main application form.
Pages:
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494