I need to convert a DataTable to IEnumerable then use LinqBridge properly... I need to parse a SELECT * FROM X
query into a Query.GroupBy(l => l.Field);
in order to use some foreach
loops correctly grouping my query...
I've tried
public static IEnumerable<DataRow> getRows(DataTable table)
{
foreach (DataRow row in table.Rows)
{
yield return row;
}
}
But I can't use getRows(myDataTable).Any()
or other Linq functions... Some help please.
I can't upgrade from Framework 2, my department wants to downgrade from my 4.0 app to 2.0 because they absoluty deny upgrading the computers, so now I'm very frustrated because my app was WPF 4.0 and I'm migrating everything to WinForm (which is a mess) and updating every method...
Thank you so much.
EDIT
Found the problem, I was calling using LinqBridge
but forgot to add after that using System.Linq
now the problem is solved and everything working... Delete this post please, or leave it here in order to guide people like me and let them know they need to call System.Linq...