Chapter 25. LINQ to SQL and Entities

In the previous chapters you were introduced to Language Integrated Queries (LINQ) as it pertains to both your standard .NET objects and how it can be used to query XML data. Of course one of the primary sources of data for any application is typically a database. So, in this chapter you see both LINQ to SQL, a technology that shipped with Visual Studio 2008, and LINQ to Entities, which is likely to ship in conjunction with SQL Server 2008. Both of these technologies can be used for working with traditional databases, such as SQL Server. This allows you to write LINQ statements that will query the database, pull back the appropriate data, and populate .NET objects that you can work with. In essence, they are both object-relational mapping frameworks, attempting to bridge the gap between the .NET object model and the data-oriented relational model.

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.