In our application, to improve the performance of filtering the rows in DataTable. We modified the below code to get IEnumerable.
DataRow[] drow = ds.Tables[0].Select("ID ='" + id + "'");
To
DataRow[] drow =
(
from item in ds.Tables[0].AsEnumerable()
where item["ID"].ToString() == id
select item
).ToArray();
It was successful and working fine. Note: ds is a dataset object.
We have another scenario to filter the rows based on the condition like
DataRow[] maxBalRow = ds.Tables[0].Select("BALANCE = MAX(BALANCE)");
Here we are unable to resolve as the condition contains "MAX" DB function.