title: Entity Framework Sqlite database: NotSupportedException
body: <p>I followed this tutorial to start a project that uses Entity Framework 5 with a SQLite db: <a href="http://brice-lambson.blogspot.be/2012/10/entity-framework-on-sqlite.html" rel="nofollow">http://brice-lambson.blogspot.be/2012/10/entity-framework-on-sqlite.html</a></p>
  
  <p>However, in my application, I have multiple projects:</p>
  
  <ul>
  <li>Project.UI: the front-end logic</li>
  <li>Project.Model: the POCO classes</li>
  <li>Project.DataAccess: the data access logic: entity framework project</li>
  </ul>
  
  <p>Now I'm getting the following exception:</p>
  
  <blockquote>
    <p>System.NotSupportedException was unhandled   HResult=-2146233067<br>
    Message=Unable to determine the provider name for connection of type
    'System.Data.SqlClient.SqlConnection'.   Source=EntityFramework</p>
  </blockquote>
  
  <p>I set up everything as in the tutorial, I installed EF5 and System.Data.SQLite into all projects. This is my App.config from the main project:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
    &lt;/startup&gt;
    &lt;system.data&gt;
      &lt;DbProviderFactories&gt;
        &lt;add name="SQLite Data Provider" invariant="System.Data.SQLite" description="Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /&gt;
      &lt;/DbProviderFactories&gt;
      &lt;connectionStrings&gt;
        &lt;add name="EasyInvoiceContext" connectionString="Data Source=|DataDirectory|EasyInvoice_v1.sqlite" providerName="System.Data.SQLite" /&gt;
      &lt;/connectionStrings&gt;
    &lt;/system.data&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
        &lt;parameters&gt;
          &lt;parameter value="v11.0" /&gt;
        &lt;/parameters&gt;
      &lt;/defaultConnectionFactory&gt;
    &lt;/entityFramework&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Does anybody have an idea what I'm doing wrong?</p>
  
  <p>More source code of my project can be found on github: <a href="https://github.com/SanderDeclerck/EasyInvoice" rel="nofollow">https://github.com/SanderDeclerck/EasyInvoice</a></p>