EF4, self tracking, repository pattern, SQL Server 2008 AND SQL Server Compact

Posted by Darren on Stack Overflow See other posts from Stack Overflow or by Darren
Published on 2010-04-27T17:58:33Z Indexed on 2010/04/27 18:03 UTC
Read the original article Hit count: 1073

Hi, I am creating a project using Entity Frameworks 4 and self tracking entities. I want to be able to either get the data from a sql server 2008 database or from sql server compact database (with the switch being in the config file). I am using the repository pattern and I will have the self tracking entities sitting in a separate assembly.

Do I need two edmx files? If so, how do I generate only one set of STE's in the separate assembly? Also do I need to generate two context classes as well? I am unsure of the plumbing for all this. Can anyone help?

Darren

I forgot to add that the two databases will be identical and that the compact version is for offline usage.

© Stack Overflow or respective owner

Related posts about c#4.0

Related posts about repository