I have a following line of code:
var availableClients = (Controller.ListClientsForCurrentUser() as DataTable).AsEnumerable();
and I want to take advantage of LINQ's extension methods (MSDN) like Any. But those methods are not visible. What is going on? I can only see Where, Select and order by methods.
Are you missing
using System.Linq;
by any chance? Once you've got an EnumerableRowCollection<TRow>
it should be fine. (The main problem using a DataTable
if if you forget to call AsEnumerable
, but that isn't a problem here.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With