0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.