3

I am setting up a WPF app with Entity Framework 4, using SQL Compact 4 as the data store. I have the files and the references set up for a SQL Compact 4.0 private deployment (per this MSDN article).

However, with SQL Compact 3.5, I had to add configuration entries to the App.config file (see this blog post and this article). I can't find anything on whether similar entries are required to use SQL Compact 4 with EF4 in a desktop app.

So, here's my question: Do I have to add special entries to App.config in order to use SQL Compact 4 with EF4? If so, can you point me to an article or blog post that shows them? Thanks for your help.

1 Answer 1

2

Found the answer in this blog post by Erik Jensen:

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

Thanks, Erik!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.