using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore; using WebApi.Models; namespace WebApi.Data; public partial class DictionaryDbContext : DbContext { public DictionaryDbContext() { } public DictionaryDbContext(DbContextOptions options) : base(options) { } public virtual DbSet Dicts { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseSqlite("Name=ConnectionStrings:Dictionary"); protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { entity.Property(e => e.Word).UseCollation("NOCASE"); }); OnModelCreatingPartial(modelBuilder); } partial void OnModelCreatingPartial(ModelBuilder modelBuilder); }