After referring to almost every question posted related to this issue. I am not able to find a solution for this problem.
I followed all the steps mentioned.
1)Download package from sqlite.org
2)install packages from nuget
Still sqlite does not appear in data source list for entity model wizard.
my app.config looks like this.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://ift.tt/1eigFsq -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.Linq, Version=1.0.98.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
<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>
</configuration>
I have tried almost anything but failed to get the basic steps required to connect to sqlite using entity framework and then read the data base.
I have created the database using DB Browser for sqlite, which is accessible through simple ADO.NET methods.
Once sqlite showed under data sources but then. provider errors were there. such as
No-Entity-Framework-provider-found-for-the-ADO-NET
Can someone please help me with the complete set of steps start from setting up environment till performing operations on sqlite dataase in visual studio 2013, .NET 4.5.1 , wpf, mvvm. Any help is appreciated.
Aucun commentaire:
Enregistrer un commentaire