Convert DataTable to IEnumerable
There’s also a DataSetExtension method called “AsEnumerable()” (in System.Data) that takes a DataTable and returns an Enumerable. See the MSDN doc for more details, but it’s basically as easy as: dataTable.AsEnumerable() The downside is that it’s enumerating DataRow, not your custom class. A “Select()” LINQ call could convert the row data, however: private IEnumerable<TankReading> ConvertToTankReadings(DataTable … Read more