Skip to content

4. Entity Framework Core & SQLite

Taner Eşme edited this page Dec 25, 2018 · 1 revision

To use SQLite in your project with entity framework core:

  • Add the references below into your project from NuGet.
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet add package Microsoft.EntityFrameworkCore.Design
  • Add the appropriate location of your data source like data source=C:\datasource\sqlite.db;
  • In your project folder, run the command: dotnet ef migrations add InitialCreate to create migration scripts, it will also add these migration files to your project.
  • Run them the command: dotnet ef database update to migrate the changes or create your database. it will create the DB that you provided as a data source.

Clone this wiki locally