using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace OliverBooth.Data.Web.Configuration; /// /// Represents the configuration for the entity. /// internal sealed class BlacklistEntryConfiguration : IEntityTypeConfiguration { /// public void Configure(EntityTypeBuilder builder) { builder.ToTable("ContactBlacklist"); builder.HasKey(entry => entry.EmailAddress); builder.Property(entry => entry.EmailAddress).IsRequired(); builder.Property(entry => entry.Name).IsRequired(); builder.Property(entry => entry.Reason).IsRequired(); } }