Menu

Using Sqlite in ASP.NET Core

Not always you have access to a sql server, localDb or SQl Express, or you dont want to have a big database for your sample application you are playing around, or application you are developing going to be run on a micro computer like Raspberry Pi. Good alternative is Sqlite. easy , simple and light weight.

Fist install NuGet

In your appsettings.json file set the connection string

on your Startup.cs in the ConfigureServices section define the databse option like below

that is it. This is why I love ASP.NET Core – simple and flexible.

important thing to remember is Sqlite does not support DefaultSchema in your DbContext.

Leave a comment