1-- Using AspNet.3.1 EntityFrameworkCode w Sqlite database
2-- Add Context class
3public class DatabaseContext : DbContext
4{
5 protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
6 {
7 optionsBuilder.UseSqlite("Filename=MyDatabase.db");
8 }
9}
10 -- Add to Startup ConfigureServices
11 services.AddEntityFrameworkSqlite ().AddDbContext<DatabaseContext> ();