저는 .NET Entity Framework에 익숙하지 않고 수백만 행이 포함 된 테이블의 레코드를 반복합니다. 기본 코드는 다음과 같습니다.엔티티 프레임 워크 쿼리 outofmemoryexception
// select the records from the database
var records = from data in dataContext.Messages
select data;
// iterate over the messages
foreach (var record in records)
{
// do nothing
}
데이터를 반복하는 동안 'outofmemoryexception'이 표시됩니다. 쿼리를 변경하거나 ObjectQuery 인스턴스의 메모리를 관리 할 수있는 방법이 있습니까? 절은 돌아 오는 기록을 깎 위치를 쿼리를 변경에 관해서는
그 반복 안에서 무엇을합니까? – Tigran
[Entity Framework 큰 데이터 집합, 메모리 부족 예외] 가능한 복제본 (http://stackoverflow.com/questions/18169859/entity-framework-large-data-set-out-of-memory-exception) –