i have a linq query similar like below.
IEnumerable query= (from item in IItemsTable.AsEnumerable()
where someconditi
You can use the extension method Any():
if(query.Any())
{
//query has results.
}
Note that if you only care whether there are rows or not (and don't subsequently do something with those rows) you can use another overload of Any()
to do it in one line:
bool queryhasresults = IItemsTable.AsEnumerable().Any(item => somecondition);