Question

Im doing caching in an application, on app start I pre-fetch a few million rows of data from a database and jam it into a local cache.

My problem is that during the fetch operation when I am loading all of that data via EF the object graph gets enormous (around 4GB, which disappears as soon as I dispose the context). I would like to be able to tell EF not to track any objects inside the scope of this query (or lifetime of the context) so that my application doesn't run out of memory.

Is there a good way to do this?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top