This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2023_Kanban/EntityConfiguration/BoardConfiguration.cs

19 lines
555 B
C#
Raw Normal View History

2023-05-11 23:20:46 +03:00
using NG_2023_Kanban.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace NG_2023_Kanban.EntityConfiguration
{
public class BoardConfiguration : IEntityTypeConfiguration<Board>
{
public void Configure(EntityTypeBuilder<Board> builder)
{
builder.HasIndex(x => x.Id);
builder.Property(x => x.Id).IsRequired();
builder.Property(x => x.Name).IsRequired();
builder.Property(x => x.Name).HasMaxLength(100);
}
}
}