DataTable Operators

In addition to the DataRow-specific operators in the DataRowExtensions class, there is a need for some DataTable-specific operators. These operators are defined in the System.Data.Entity.dll assembly, in the static System.Data.DataTableExtensions class.

AsEnumerable

I am guessing that you are probably surprised to see the AsEnumerable operator here. In fact, you may be surprised to learn that there is an AsEnumerable operator specifically for the DataTable class that returns a sequence of DataRow objects. If so, I am pleased because it means you were not wondering throughout this whole chapter why I hadn't mentioned it yet. After all, I have called it in virtually every example.

Yes, if you look in the System.Data.DataTableExtensions ...

Get Pro LINQ: Language Integrated Query in C# 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.