(MVC) MVC (2018)

How to use SQLite with EF6.

All needed information about SQLite has assembly in site https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki, and this is another instruction from developer https://github.com/ErikEJ/SqlCeToolbox/wiki/EF6-workflow-with-SQLite-DDEX-provider.

But understanding all of that information is little bit challenge, therefore I try to enumerate main point of this site:


I

II

This is result of SQLite installation to my computer


But after I done EF Wizard it still do not working. One string I add manually.



  • This is Toolbox diagnostic of my development computer.


       1:  Version 4.7.645.0
       2:   
       3:  SQL Server Compact 4.0 in GAC - Yes - 4.0.8876.1
       4:  SQL Server Compact 4.0 DbProvider - Yes
       5:  SQL Server Compact 4.0 DDEX provider - No
       6:  SQL Server Compact 4.0 Simple DDEX provider - Yes
       7:  SQL Server Compact 3.5 in GAC - Yes - 3.5.8080.0
       8:  SQL Server Compact 3.5 DbProvider - Yes
       9:  SQL Server Compact 3.5 DDEX provider - No
      10:  Sync Framework 2.1 SqlCe 3.5 provider - No
      11:  SQLite ADO.NET Provider included: 1.0.110.0
      12:  SQLite EF6 DbProvider in GAC - Yes
      13:  System.Data.SQLite DDEX provider - Yes
      14:  SQLite Simple DDEX provider - Yes

  • This is fragment of my machine.config provider, related to SQLite (Net framework 4, 32-bit).


     168:    <system.data>
     169:      <DbProviderFactories>
     170:        <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.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
     171:        <add name="Microsoft SQL Server Compact Data Provider" 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=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
     172:        <remove invariant="MySql.Data.MySqlClient" />
     173:        <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.15.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
     174:      <add name="SQLite Data Provider" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /></DbProviderFactories>
     175:    </system.data>

  • And this is list of my GAC, related to SQLite.



       1:  Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
       2:  Copyright (c) Microsoft Corporation.  All rights reserved.
       3:   
       4:  The Global Assembly Cache contains the following assemblies:
    1077:    System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=AMD64
    1183:    System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86
    3058:    System.Data.SQLite.EF6, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL
    3059:    System.Data.SQLite.Linq, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL
    3310:  Number of items = 3304

  • III

    Also there are some another cunning to use SQLite with EF6.



    ( )
    <00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
    Link to this page: //www.vb-net.com/SQLite_EF6/index.htm
    <SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>