<?xml version="1.0" encoding="utf-8"?><configuration><configSections><!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --><sectionname="entityFramework"type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"requirePermission="false"/></configSections><startup><supportedRuntimeversion="v4.0"sku=".NETFramework,Version=v4.5"/></startup><entityFramework><providers><providerinvariantName="System.Data.SqlClient"type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/><providerinvariantName="System.Data.SQLite.EF6"type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/><providerinvariantName="System.Data.SQLite"type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/></providers></entityFramework><system.data><DbProviderFactories><removeinvariant="System.Data.SQLite.EF6"/><addname="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"/><removeinvariant="System.Data.SQLite"/><addname="SQLite Data Provider"invariant="System.Data.SQLite"description=".NET Framework Data Provider for SQLite"type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories></system.data></configuration>
添加如下引用EntityFramework.dllEntityFramework.SqlServer.dllSystem.Data.SQLite.dllSystem.Data.SQLite.EF6.dllSystem.Data.SQLite.Linq.dll在app.config内添加如下内容(没有可以自己新建一个)<configSections>xml <!-- For more information on Entity Framework config.