using Microsoft.EntityFrameworkCore; using SoroushAsadi.Models; namespace SoroushAsadi.Database; public class AppDbContext(DbContextOptions options) : DbContext(options) { public DbSet ContentSections => Set(); protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(e => { e.ToTable("sections"); e.HasKey(x => x.Key); e.Property(x => x.Key).HasColumnName("key"); e.Property(x => x.DataJson).HasColumnName("data"); e.Property(x => x.UpdatedAt).HasColumnName("updated_at"); }); } }