oliverbooth.dev/OliverBooth/Data/Web/Configuration/ProgrammingLanguageConfiguration.cs
Oliver Booth cbfdefae71
style: redesign projects page
This change separates the project logo and details into separate pages and makes the list more visually striking.
2023-12-24 12:20:03 +00:00

21 lines
661 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace OliverBooth.Data.Web.Configuration;
/// <summary>
/// Represents the configuration for the <see cref="ProgrammingLanguage" /> entity.
/// </summary>
internal sealed class ProgrammingLanguageConfiguration : IEntityTypeConfiguration<ProgrammingLanguage>
{
/// <inheritdoc />
public void Configure(EntityTypeBuilder<ProgrammingLanguage> builder)
{
builder.ToTable("ProgrammingLanguage");
builder.HasKey(e => e.Key);
builder.Property(e => e.Key).IsRequired();
builder.Property(e => e.Name).IsRequired();
}
}