views:

27

answers:

2

I have VS 2008 SP1 and SQL Compact Compact 3.5 SP 1 installed.

I can see "ADO.NET Entity Data Model" when I go to Add -> New Item in Web Application project but same is not shown in Smart Device 2.0 application.

How to use Entity Framework (which version) with .NET CF 2.0 application and SQL Compact 3.5 SP 1?

+1  A: 

The problem with the Compact Framework generally is that it doesn't support MSIL generation. Frameworks such as the Entity Framework often rely on generating MSIL at runtime. This is an expensive operation and really doesn't fit inside any device. As such, object relational mappers really need to be geared towards the Compact Framework specifically, to support it. The Entity Framework, being part of the Enterprise Library, is geared towards server software.

Anyway, there is some hope of future support: msdn support forums.

In the meantime you can pursue other options. For example, here are some interesting alternatives that use SQLite:

CatNap

sqlite-net

Good luck!

Daniel Lidström
+1  A: 

How to use Entity Framework (which version) with .NET CF 2.0 application and SQL Compact 3.5 SP 1?

You can't, it's not supported on the .NET compact framework.

Thomas Levesque

related questions