SQL Server CE 4.0 with SQLmetal

I created a small test project in WebMatrix that uses SQL Server CE 4.0. Without being a fan of using embedded SQL, I wanted to create some LINQ2SQL domain classes for the SQL Server CE 4.0 database created by WebMatrix. Unfortunately, SQLmetal complains that the database file is corrupt or incompatible.

Is there a version SQLmetal.execompatible with SQL Server CE 4.0 and can it be loaded independently of Visual Studio?

Thanks in advance.

+3
source share
3 answers

Sql metal sqlce 4.0 ( ), linq2entity POCOS . , , . , microsoft linq2sql sqlce4.0, .

+6
<system.data>
    <DbProviderFactories>
        <remove invariant="System.Data.SqlServerCe.3.5" />
        <add name="Microsoft SQL Server Compact Data Provider 4.0" 
             invariant="System.Data.SqlServerCe.3.5" 
             description=".NET Framework Data Provider for Microsoft SQL Server Compact" 
             type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </DbProviderFactories>
</system.data>

, :

  • SqlMetal.exe ( VS cmd: SQlMetal)
  • SqlMetal.exe.config, "system.data" "", SQL Server CE DataProvider 3.5 4.0:
+1

- Windows 8 Visual Studio 2012 -, SSCE 3.5 Windows 8.

0

Source: https://habr.com/ru/post/1787289/


All Articles