using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; namespace IsleBot; public class DbManager : DbContext { public DbSet Players { get; set; } public DbSet Cards { get; set; } public DbSet Matches { get; set; } public string dbpath { get; } = "database.db"; public DbManager() { var fullPath = Environment.CurrentDirectory + Path.DirectorySeparatorChar + dbpath; dbpath = fullPath; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseSqlite($"Data Source={dbpath}"); }