using API.Models.Internal.Altersgruppen; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace API.Database.Configurations { public class AltersGruppeConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder entity) { // Primary Key entity.HasKey(e => e.Id); // Id-Konfiguration entity.Property(e => e.Id) .HasMaxLength(26) .IsRequired() .ValueGeneratedNever(); // Name entity.Property(e => e.Name) .HasMaxLength(100) .IsRequired(); // StartingAge entity.Property(e => e.StartingAge) .IsRequired(); // EndingAge entity.Property(e => e.EndingAge) .IsRequired(); } } }