SyntaxFix
Write A Post
Hire A Developer
Questions
Try explicitly enumerating the results by calling ToList().
ToList()
Change
foreach (var item in query)
to
foreach (var item in query.ToList())