using Microsoft.Extensions.Configuration; using Microsoft.EntityFrameworkCore; using GameLibrary.Models; namespace GameLibrary.Data { public class GameContext : DbContext { protected readonly IConfiguration Configuration; public GameContext(IConfiguration configuration) { Configuration = configuration; } protected override void OnConfiguring(DbContextOptionsBuilder options) { // connect to sqlite database options.UseSqlite(Configuration.GetConnectionString("DefaultConnection")); } public DbSet Games { get; set; } } }