I am using the entity framework (ef) and am getting the following error:
\"The result of a query cannot be enumerated more than once.\".
Try replacing this
var query = context.Search(id, searchText);
with
var query = context.Search(id, searchText).tolist();
and everything will work well.