help! Linq query
Posted
by menon
on Stack Overflow
See other posts from Stack Overflow
or by menon
Published on 2009-10-29T14:04:48Z
Indexed on
2010/04/13
15:03 UTC
Read the original article
Hit count: 242
I am getting error msg on the word Records - Type or namespace could not be found. Please help debugging it, what is missing?
if (ProjDDL1.SelectedItem.Value != "--") results = CustomSearch<Records>(results, s => s.Business == ProjDDL1.SelectedItem.Value);
Method CustomSearch:
private DataTable CustomSearch<TKEY>(DataTable dt, Func<Records, bool> selector)
{
DataTable results = (dt.AsEnumerable().Where(selector).CopyToDataTable());
return results;
}
© Stack Overflow or respective owner