• 【sqlite】2.Nuget下载好Sqlite.EF6后出现运行报错处理办法


    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </configSections>
        <entityFramework>
            <providers>
                <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
                <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
                <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
            </providers>
        </entityFramework>
        <system.data>
            <DbProviderFactories>
                <remove invariant="System.Data.SQLite.EF6" />
                <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" />
                <remove invariant="System.Data.SQLite" />
                <add name='SQLiteData Provider' invariant='System.Data.SQLite' description='.Net Framework DataProvider for SQLite' type='System.Data.SQLite.SQLiteFactory,System.Data.SQLite'/>
            </DbProviderFactories>
        </system.data>
        <connectionStrings>
            <add name="mainEntities2" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SQLite.EF6;provider connection string=&quot;data source=E:工作WpfApp2SqliteEfTestDataBase.db&quot;" providerName="System.Data.EntityClient" />
        </connectionStrings>
    </configuration>
    <add name='SQLiteData Provider' invariant='System.Data.SQLite' description='.Net Framework DataProvider for SQLite' type='System.Data.SQLite.SQLiteFactory,System.Data.SQLite'/>

    System.NotSupportedException:“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.”

  • 相关阅读:
    最接近原点的 K 个点
    水域大小
    根据数字二进制下 1 的数目排序
    有效的山脉数组
    岛屿的周长
    求根到叶子节点数字之和
    数组中的最长山脉
    [转] 结构体file_operations
    获取主机硬件资源 函数
    readdir() 获取文件类型
  • 原文地址:https://www.cnblogs.com/tofight/p/15465041.html
Copyright © 2020-2023  润新知