標籤:des style blog http color os io ar for
使用者代碼未處理 System.InvalidOperationException
HResult=-2146233079
Message=未找到具有固定名稱“System.Data.SQLite”的 ADO.NET 提供者的Entity Framework提供者。請確保在應用程式設定檔的“entityFramework”節中註冊了該提供者。有關詳細資料,請參閱 http://go.microsoft.com/fwlink/?LinkId=260882。
Source=EntityFramework
StackTrace:
webconfig
<connectionStrings> <add name="UserConnection" connectionString="data source=|DataDirectory|\UserRole.s3db" providerName="System.Data.SQLite"/> <!--<add name="UserModel" connectionString="data source=(LocalDb)\v11.0;initial catalog=UserRole.Models.UserModel;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />--> </connectionStrings> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite" /> <!--<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory,System.Data.SQLite, Version=1.0.93.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/>--> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory,System.Data.SQLite" /> <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" /> </DbProviderFactories> </system.data> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <parameters> <parameter value="v11.0" /> </parameters> </defaultConnectionFactory> <providers> <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> </providers> </entityFramework>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
改為
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
未找到具有固定名稱“System.Data.SQLite”的 ADO.NET 提供者的Entity Framework提供者