The first version of Microsoft Sql Server CE 3.5 provider for DataObjects.Net 4 is going to be officially shipped in the upcoming DataObjects.Net 4.2 release.
Let me shortly introduce Sql server CE’s limitations. So it doesn’t support:
|Feature||Where is used||Workaround, if any|
|Temporary tables||Local collections support||Regular tables are created and dropped automatically|
|Full-text search||Full-text queries||-|
|Batches||Batch database operations||-|
|CROSS APPLY SQL operator||“First”, “Single”, “ElementAt”, etc. LINQ methods inside sub queries; |
”SelectMany” LINQ method without “DefaultIfEmpty” specifying
|UPDATE FROM [Table]||Upgrade procedure||Another, but analogous SQL statement is used|
|INSERT DEFAULT VALUES||Insert operation||Default values are explicitly specified|
|ROW NUMBER SQL operator||“Skip” LINQ methods||-|
|INTERSECT, EXCEPT SQL operators||“Except”, “Intersect” LINQ methods||-|
|nvarchar(max), varchar(max), varbinary(max) datatypes||text, ntext, image are used instead|
|COUNT_BIG function||“Count” LINQ method||Result of “Count” is explicitly casted to bigint type|
But despite of all these limitations there is one huge advantage of CE usage: it doesn’t require separate installation. This is significant feature for developers who works on desktop applications for personal use, for example. Just ship, install and it works. No more problems with database server installation, connections, firewalls, network configurations, etc. Another case is running tests on your business model. Actually, you don’t need big database server for this.
In order to use DataObjects.Net 4 with Sql Server CE instead of his big brother, use the following connection url:
<domain connectionUrl="sqlserverce://user:password@localhost/<Path to your database file>"/>
Another option is to use native connection string:
<domain provider="sqlserverce" connectionString="Data Source=<Path to your database file>"/>
Sql Server CE 3.5 provider for DataObjects.Net 4 is already available in DataObjects.Net 4.2 RC.