19 lines
586 B
C#
19 lines
586 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace ASPTemplate.Backend.Database.Tables;
|
|
|
|
public class Config {
|
|
public string Key { get; set; } = null!;
|
|
public string Value { get; set; } = null!;
|
|
|
|
public class Configuration : IEntityTypeConfiguration<Config> {
|
|
public void Configure(EntityTypeBuilder<Config> builder) {
|
|
builder.ToTable("Config");
|
|
builder.HasKey(p => p.Key);
|
|
builder.Property(b => b.Key).HasColumnName("Key").IsRequired();
|
|
builder.Property(b => b.Value).HasColumnName("Value").IsRequired();
|
|
}
|
|
}
|
|
}
|