using System; using System.Data.Common; using Microsoft.EntityFrameworkCore; using Model; namespace EntityFrameworkLib { public class LolContext : DbContext { public DbSet Champions { get; set; } public LolContext() { } public LolContext(DbContextOptions options) : base(options) { } protected override void OnConfiguring(DbContextOptionsBuilder options) { if (!options.IsConfigured) { base.OnConfiguring(options.UseSqlite($"DataSource=projet.Champions.db")); } } /*protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity() .Property(c => c.Image) .IsRequired(false); modelBuilder.Entity() .HasKey(li => li.Base64); }*/ } }