I love SQL CE 4.0 because it promises to solves a problem that only SQLite has been able to solve thus far: no-install, x-copy deployable relational engine with good performance.
The disadvantage in using such a recent engine is that tooling is only slowly coming together and is not there yet. I’ve been playing a little with LinqPad though and have noticed that SQL CE 4.0 was already supported. Here’s how to set it up.
Download and “install” LinqPad (the install is just unzipping the package wherever you want):
Once you’ve unzipped the package and double-clicked the executable, you should see the following screen:
Now click “Add Connection”. Switch to “Use a typed data context from your own assembly” and click “Entity Framework” then the “Next >” button:
On the next screen, under “Data Context”, choose “Automatic”, and under “Provider” choose “SQL CE 4.0”.Finally, click “Browse” next to “Attach database file” and choose your SQL CE .sdf file:
Click “OK” and there you go: your SQL CE 4.0 database opens in LinqPad:
That was easy. But still, super-useful.
UPDATE: Sébastien Ros reminds me that there is a SQL Server Compact toolbox that integrates into VS and that you might want to try as well: