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