Quote:
DataTable dt = new DataTable("Table_insertion");
bool exists = dt.AsEnumerable().Any(row => type == row.Field<String>("Type"));
You create a new empty
DataTable
, which doesn't have any rows. You then test to see whether any of the zero rows in that table match your condition.
Unsurprisingly, the answer will always be "no". :)