0
EF 5.0 및 코드를 먼저 사용하고 있으며 수동 SQL 쿼리를 사용하여 엔티티 배열을 채울 필요가 있습니다. 그러나 db에서 전체 엔터티를로드 할 필요는 없지만 몇 개의 필드 만로드하면됩니다. 추적 할 필요도 없습니다. EF로 수동 SQL 쿼리를 사용하여 부분로드
The data reader is incompatible with the specified 'XXX_Type'. A member of the type, 'XXX_Some_Not_Loaded_Property', does not have a corresponding column in the data reader with the same name.
이없는 필드를 무시 EF 강제로 어떤 방법이 있습니까 :
모두
Context.Set<TEntity>().SqlQuery(queryText, parameters)
및
Context.Database.SqlQuery<TEntity>(queryText, parameters)
예외를 던지고있다?
고마워, 트릭을했지만 여전히 더 우아한 해결책을 찾고있다. – nativehr