Entity Framework: The result of a query cannot be enumerated more than once

While using Stored Procedure with Entity Framework if you get below error Message:

error  
                                                                           Image 1.  

It simply means: Try explicitly enumerating the results by calling ToList().

Replace Your Code From

foreach (var item in query)

To #:

foreach (var item in query.ToList())

Ebook Download
View all
Learn
View all