using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Models.Entities; namespace Configurations { public class DepartmentConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("departments"); builder.HasKey(d => d.DepartmentId); builder.Property(d => d.DepartmentId) .HasColumnName("department_id"); builder.Property(d => d.DepartmentName) .HasColumnName("department_name") .IsRequired() .HasMaxLength(100); } } }