using Microsoft.EntityFrameworkCore; namespace DamageAssesment.Api.Answers.Db { public class AnswerDbContext:DbContext { public AnswerDbContext(DbContextOptions options):base(options) { } public DbSet Answers { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity() .Property(item => item.Id) .ValueGeneratedOnAdd(); } } }