using Microsoft.EntityFrameworkCore; namespace GSS2.Core.Analysis.AmineContent.Database; // TODO: Добавить внешние ключи в таблицы и правило что при удалении ключа ключ должен сбрасываться на 0 public class Context : DbContext { public DbSet BrandRecords => Set(); public DbSet ImageRecords => Set(); public DbSet ResultRecords => Set(); public DbSet SeparatorRecords => Set(); public DbSet SampleRecords => Set(); public Context(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity() .Property(e => e.Features) .HasConversion(new CompressedFloatListConverter()); modelBuilder.Entity() .Property(e => e.Features) .HasConversion(new CompressedFloatListConverter()); } }