I get an OutOfMemoryException while executing the following code, there are 584678 MyState entries:
The pseudo schema below:
Is that the expected behaviour ?
asked Jul 09 '13 at 11:08
I can't say exactly with provided information.
However here are some ideas:
Our bulk operations extension supports server-side removal of entities. However it is incapable of processing paired assocation logic, so you will need to do this by manually (if you have paired assocations). Also executing bulk operation resets your session cache. This will degrade performance if you plan to access entities after that.
Alternatively you could try to remove entities in smaller batches:
answered Jul 09 '13 at 11:58
Thanks for your quick answer.
As this is the expected behaviour and the removal using Session.Current.Remove processes every entity one by one, I am going to use the bulk operations extension.
answered Jul 09 '13 at 12:03