Save your changes to the Properties by using the Ctrl+S key combination or by
selecting Save from the File menu, and then close this window.
Now you create the mappings to the database objects (DataContext and associated entities), and the best
way to do that is use the built-in LINQ templates. In Solution Explorer, right-click on the solution and
select Add ???New Item from the context menu. In the AddNew Item dialog, select the Data node under
Categories. The Templates section of the Add New Item dialog will display all available Data templates.
In the Templates section, select LINQ to SQL Classes and name it Fabrikam. Click Add.
The Fabrikam Dataset Designer opens and displays an empty designer. It??™s time to add the server objects.
In the Server Explorer window, right-click on the DataConnections node and select Add Connection.
The Add Connection dialog displays. Enter the appropriate connection information to connect to your
instance of SQL Server and the Fabrikam database. Click the Test Connection button to ensure that the
connection information has been entered correctly and that Visual Studio can successfully connect to the
Fabrikam database.
Pages:
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493