Don’t use Load(). It’s whole point is to load all the rows into memory, and uses lots of memory.
Huge Memory Issue in Entity framework Load Method
Indudhar Gowda
426
Reputation points
this.Context.TestPRepetitions.Where(tp => sampleCodes.Contains(tp.SampleCode))
.Include(tp => tp.ReportableResults)
.Load();
this.Context.Recognitions.Where(rec => reportableResultIds.Contains(rec.ReportableResultId)).Load();
Recognitions Table has 6352014 Rows
@AgaveJoe this what the Actual Method Does...
Developer technologies | .NET | Other
Developer technologies | .NET | Other
Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
SQL Server | Other
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
1 answer
Sort by: Most helpful
-
Bruce (SqlWork.com) 82,146 Reputation points Volunteer Moderator
2022-05-04T21:21:01.43+00:00