mirror of
https://github.com/farcasclaudiu/PracticeCalendar.git
synced 2026-06-22 19:01:24 +03:00
20 lines
623 B
C#
20 lines
623 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using PracticeCalendar.Domain.Entities;
|
|
|
|
namespace PracticeCalendar.Infrastructure.Persistence.Configuration
|
|
{
|
|
public class PracticeEventConfiguration : IEntityTypeConfiguration<PracticeEvent>
|
|
{
|
|
public void Configure(EntityTypeBuilder<PracticeEvent> builder)
|
|
{
|
|
builder.Property(x => x.Title)
|
|
.HasMaxLength(120)
|
|
.IsRequired();
|
|
builder.Property(x => x.Description)
|
|
.HasMaxLength(1000)
|
|
.IsRequired();
|
|
}
|
|
}
|
|
}
|