See Mike's posts above.
Is this the regular EntitySpaces SqlCe provider, or the CF version?
Do you have a "File Mode" parameter in your connection string?
Our NUnit tests do not use mock objects. We do acceptance/functional tests all the way through to all our supported databases. The SqlCe tests read and write to number of test databases dozens of times without locking up.
I just connected to one of our SqlCe databases in my WinForm test app, loaded a DataGridView, then made several adds, edits, deletes and clicked Save. Then, made several more changes and clicked Save again. All changes were saved, identity keys brought back, and no exceptions thrown.
We should be opening and closing connections with each Load and Save, and not holding any connection open. As a single user database, I believe it can have multiple connections open for foreground and background operations, but there is no connection pooling. That stack trace looks pretty intense. Can you reproduce this in a simpler app against Northwind?
David Neal Parsons
www.entityspaces.net