2023-12-24 12:20:03 +00:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
2024-03-02 00:43:56 +00:00
|
|
|
using OliverBooth.Common.Data.Web.Projects;
|
2023-12-24 12:20:03 +00:00
|
|
|
|
2024-03-02 00:43:56 +00:00
|
|
|
namespace OliverBooth.Common.Data.Web.Configuration;
|
2023-12-24 12:20:03 +00:00
|
|
|
|
|
|
|
/// <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();
|
|
|
|
}
|
|
|
|
}
|