using Microsoft.EntityFrameworkCore; using SurveyLib.Core.Models; using SurveyLib.Core.Models.QuestionVariants; namespace SurveyLib.Infrastructure.EFCore.Data; public class SurveyDbContext : DbContext { public DbSet Surveys { get; set; } public DbSet Questions { get; set; } public DbSet SingleAnswerQuestions { get; set; } public DbSet MultipleAnswerQuestions { get; set; } public DbSet TextQuestions { get; set; } public DbSet Completions { get; set; } public DbSet Answers { get; set; } public SurveyDbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity().HasKey(a => new { a.CompletionId, a.QuestionId }); } }