LINQ to SQL Figure 2: Data Retrieval with Stored Procedures Complicates Use of the LinqDataSource.
This test harness illustrates how EntityRef associations can replace the Order.CustomerID, Order.EmployeeID, and Order.ShipVia entity property (foreign key) values with Customer.CompanyName, Employee.LastName, and Shipper.CompanyName values. Developers in organizations that require all database access to be via stored procedures will find that they need workarounds to overcome or ameliorate problems with excessive server round-trips. It also takes complex stored procedures to correctly order rows returned by the LinqDataSource's server-side paging and sorting features.