October 2010
Intermediate to advanced
1920 pages
73h 55m
English
LINQ to SQL is the preferred method of data access in .NET Framework. The expectation is that you will use LINQ to SQL instead of ADO.NET to interact with a database. Chapter 20, “Data Access with LINQ to SQL,” is devoted to the topic of LINQ to SQL.
Here’s a quick sample of binding an ObjectDataSource to a component that represents a LINQ to SQL query. The component that contains the LINQ query is contained in Listing 18.7.
Listing 18.7. Employee.cs

Before you can use the component in Listing 18.7, you first must create the EmployeesDataContext. The easiest way to create the DataContext is to select Website, Add ...
Read now
Unlock full access