Chapter 6. Getting started with LINQ to SQL

This chapter covers:

  • Using LINQ to SQL to access data from SQL Server
  • The advantages of LINQ to SQL for fetching relational data
  • Updating data with LINQ to SQL

So far in this book, we’ve focused on working with data once it is already in memory. In order to query it, we need a group of items we can iterate over using the IEnumerable<T> interface. While the ability to work with data already in memory is a much-needed feature, it fails to address a large part of the picture—moving data to and from a persistence medium, typically a relational database system like SQL Server.

By this point, we should be able to handle a fairly complex LINQ to Objects query. In this chapter, we’re going to take a look ...

Get LINQ in Action 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.