16 lines
444 B
C#
16 lines
444 B
C#
using Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace Infrastructure.EntityTypes
|
|
{
|
|
public class LinkEntityType : IEntityTypeConfiguration<Link>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Link> builder)
|
|
{
|
|
builder.HasKey(o => o.Id);
|
|
builder.Property(o => o.Url).HasMaxLength(250).IsRequired();
|
|
builder.Property(o => o.CreatedAt).IsRequired();
|
|
}
|
|
}
|
|
} |