[LINQ] The query results cannot be enumerated more than once (using databinding…)

When you bind the ISingleResultfor the first time, the results are enumerated and the data object is populated.
When you bind the same ISingleResult instance to the same control again, it detects that the data-source is the same as its last source (by comparing their object references) and does not enumerate the ISingleResult instance for the second time

This occurs also when you try to do a second operation on the linq object…

a simple workaround is to transform the ISingleResultinto a list, and use that list object to manipulate data.

var query = <<query logic>>; 
var myList =  query.ToList();

Leave a Reply