I am getting a cast error with Linq to a DataTable that was populated with Oracle.
bool isTrue = DataTable.AsEnumerable().Any
(x => x.Field<int>("MYNUMBERFIELD") == MYNUMBER);
In SQL this works fine as expected. In Oracle is fails with a cast error on the cast. In C# code the same thing happens when you do the following:
int myint = (int)VariableRetrievedFromOracleDB;
If you change it to int myint = Convert.ToInt32(VariableRetrievedFromOracleDB)
it works fine.
Any ideas how to handle this with the lambda?