Using SQLite and EF6
Created a sample console app using SQLite and EF6. The application uses the Chinook SQLite database and just displays the list of artists and albums that begin with A.
Below is the README:
Demonstrates usage of SQLite and EF6 in a console app
- System.Data.SQLite 18.104.22.168
- Chinook SQLite Database
- Create Blank Visual Studio Solution
- Create Class Library Project
- Create Console project
- Install packages:
PM> Install-Package ChinookDatabase.Sqlite
PM> Install-Package System.Data.SQLite
- Installing SQLite also installs EF6
Update-Package or Update-Package –reinstall <package name>
<package name> blank to reinstall all
Column 'InvariantName' is constrained to be unique.
Value 'System.Data.SQLite' is already present.
Not sure why, but make sure to have the config for entityFramework and DbProviderFactories this way.
Reference to complex property in entity class requires specifying the property that references the complex property
SQL logic error or missing database
no such column: Extent1.Artist_ArtistId
EF6 with SQLite still does not support Code First migrations.
Your migration code may need to use the SQLite api directly.