views:

256

answers:

1

My production is on full blown SQL Server 2008.

I would like to have integration tests with some light weight database that

  • doesn't have to be installed on the machine and
  • doesn't run as a service

...if at all possible.

I use LINQ to Entities in my code that probably makes this goal even more complicated.

Is it possible to use any lightweight DB to accomplish this goal? Do those DBs have LINQ providers or whatever they're called to translate LINQ to actual queries...

Anybody has any experience with LINQ to Entities with third party databases?

+3  A: 

What about SQL Server 2008 Express? That's about as lightweight as a SQL Server 2008 compatible system gets. It's basically a light-weight workstation install for SQL Server - it's a server, it's a service in the background. http://www.microsoft.com/express/sql/default.aspx

There's also SQL Server Compact 3.5 which should be compatible with SQL Server 2008, but I don't know if it's supported by the Entity Framework as a store. This is just a bunch of DLLs you need to add to your project, and it stores all its data in a single .sdf file. http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx

Marc

marc_s
I'd like to avoid installing SQL Express. In this case I'd install Standard edition. But I'd like to avoid database installations for integration testing.
Robert Koritnik
Then I'd suggest you have a good look at SQL Server Compact - hopefully, it support Entity Framework - no installs needed here, AFAIK
marc_s
+1 for SQL Compact
Robert Koritnik
@Robert: how is it integration testing when you're not integrating with a database that's in any way like the one you'll really use?
John Saunders
@John. Underlying RDBMS should be similar to SQL Server. Schema will always be the same. But you may be right. There may be security issues that may make integration tests irrelevant.
Robert Koritnik
There are some SQL CE limitations when used with Entity Framework. See here: http://technet.microsoft.com/en-us/library/cc835494.aspx - in particular, no server-generated keys, and no `Skip` and `Take`.
Pavel Minaev