Chapter 7. LINQ to DataSet

In This Chapter

  • Interacting with a DataSet using LINQ

  • Developing a simple LINQ to DataSet example

  • Working with the LINQ to DataSet operators

  • Filtering output

  • Interacting with multiple DataSet tables

The DataSet object has gone through many permutations. However, NET developers recognize the DataSet as a kind of in-memory database. You can use it when interacting with a physical database, a Web service, or to create your own local databases. No matter how you work with the DataSet, it always provides some type of relational database model for storing your data, so it does help you model more complicated scenarios involving data within a physical database such as SQL Server or MySQL. Consequently, the DataSet is probably one of the first uses you thought about when you learned about LINQ. Querying a DataSet is a natural part of the LINQ experience.

This chapter describes both single and multiple table scenarios when using the LINQ to DataSet provider. The goal of this chapter is to help you discover the LINQ to DataSet provider, rather than explore specific methods of using the DataSet control. The specific usage methods appear in other chapters of this book. For example, you use the LINQ to DataSet provider as part of working with SQL Server in Chapter 8. Of course, Chapter 8 also helps you discover the LINQ to SQL provider. To reduce the complexity of the examples in this chapter, most of the examples will rely on locally defined data sets.

As part of describing ...

Get LINQ For Dummies® 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.