开发者

EntityFramework. OutOfMemoryException

I have objects graph approximately ~80K records.

When I call SaveChanges I have an OutOfMemoryException. I've been reading 开发者_开发百科about separating saveChanges in batches, but I've don't know how to do it. The trouble that I have in the context chanegd data from 7 tables and there is no straight hierarchy.

How to solve the issue?


My advice would be to use a stored procedure. You could try breaking up your data into groups and and changing each individually but it will be inelegant and prone to bugs. Stored procedures will also be much faster which could have a significant affect considering you are using a large dataset.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜