摘要:SQL CE 4與3.5的比較
SQL CE 4是針對WebMatrix與Orchard所設計的資料庫,而且支援ADO.Net Entity Framework。
SQL CE 3.5是針對行動裝置與桌面應用程式所設計的資料庫,而且支援ADO.Net Entity Framework。
若欲使用SQL CE 4針對桌面應用程式設計資料庫,必須另外安裝其他元件方能支援ADO.Net Entity Framework。
SQL CE 3.5應該運用UniqueIdentifier作為主鍵值的型別,並未直接支援使用int作為主鍵值的型別。
參考資料:
1、
Designers in the VB or C# Windows projects in Visual Studio 2010 SP1 Beta: The following wizards do not work with Compact 4.0 in the Windows project system. Developers can manually add reference to the ADO.NET provider for Compact 4.0 (System.Data.SqlServerCe) to develop programs for Compact 4.0 in the Windows projects:
- The Data Source Configuration Wizard that is used to configure datasets.
- The Configure Data Configuration wizard that is used to setup the syncing of data and schema with SQL Server using Sync FX.
- The Entity Data Model wizard that is used to generate entities from a Compact database.
Microsoft SQL Server Compact 4.0 is available for download
http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx
2、
SQL Server Compact does not support entities with server-generated keys or values when it is used with the Entity Framework, although the Entity Framework allows you to define entity types with server-generated keys or values. Data manipulation operation on an entity that has server-generated values throws a "Not supported" exception.
Entity Framework (SQL Server Compact)
Limitations of the SQL Server Compact
http://msdn.microsoft.com/en-us/library/cc835494(v=SQL.105).aspx