title: Unable to determine the provider name for provider factory of type "System.Data.Sqlite.SqliteFactory"
body: <p>I want to use sqlite entity framework in my web api project,  but it always can't work well, </p>
  
  <p>here is my development enviroment.</p>
  
  <p>1.Visual studio 2013, .net framework 4.5</p>
  
  <ol start="2">
  <li><p>sqlite package version is 1.0.97, I installed below packages</p>
  
  <p>system.data.sqlite, 
  system.data.sqlite.ef6,
  system.data.sqlite.linq</p></li>
  <li><p>EntityFramework is 6.1.3</p></li>
  </ol>
  
  <p><strong>Here is exception that I got</strong></p>
  
  <p><em>Unable to determine the provider name for provider factory of type 'System.Data.SQLite.SQLiteFactory'. Make sure that the ADO.NET provider is installed or registered in the application config</em></p>
  
  <p><strong>Here is my webconfig</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
    &lt;/configSections&gt;
  
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
        &lt;parameters&gt;
          &lt;parameter value="mssqllocaldb" /&gt;
        &lt;/parameters&gt;
      &lt;/defaultConnectionFactory&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /&gt;  &lt;!--type="System.Data.SQLite.EF6.SQLiteProviderServices--&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;system.data&gt;
      &lt;DbProviderFactories&gt;
        &lt;remove invariant="System.Data.SQLite.EF6" /&gt;
        &lt;add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" /&gt;
      &lt;/DbProviderFactories&gt;
    &lt;/system.data&gt;
    &lt;connectionStrings&gt;
      &lt;add name="Sqlite" connectionString="data source=&amp;quot;D:\MyWebAPI\src\MyWeb.Api\App_Data\sqlite_test.db&amp;quot;" providerName="System.Data.SQLite.EF6" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I can connect sqlite database file through "connect to database" in tool of visual studio, I also can generate entity using code first.</p>
  
  <p>but I can't get data normal</p>
  
  <p><strong>Here is my code</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> public partial class Sqlite : DbContext
      {
          public Sqlite()
              : base("name=Sqlite")
          {
          }
  
          public virtual DbSet&lt;AuthorizationLog&gt; AuthorizationLogs { get; set; }
          public virtual DbSet&lt;Checksum&gt; Checksums { get; set; }
  
          protected override void OnModelCreating(DbModelBuilder modelBuilder)
          {
              modelBuilder.Entity&lt;AuthorizationLog&gt;()
                  .Property(e =&gt; e.ClientKey)
                  .IsUnicode(false);
  
              modelBuilder.Entity&lt;AuthorizationLog&gt;()
                  .Property(e =&gt; e.Login)
                  .IsUnicode(false);
  
              modelBuilder.Entity&lt;AuthorizationLog&gt;()
                  .Property(e =&gt; e.Password)
                  .IsUnicode(false);
  
              modelBuilder.Entity&lt;AuthorizationLog&gt;()
                  .Property(e =&gt; e.ConnectionString)
                  .IsUnicode(false);
          }
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>   public class ValuesController : ApiController
      {
          // GET api/values
          Sqlite ctx = new WebApi2Demo.Sqlite();
          public IEnumerable&lt;Checksum&gt; Get()
          {
              return ctx.Checksums;
          }
   }</code></pre>
  </div>
  </div>
  </p>