15 lines
442 B
C#
15 lines
442 B
C#
using BlueLaminate.EFCore.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace BlueLaminate.EFCore.Configurations;
|
|
|
|
public class CollectionConfiguration : IEntityTypeConfiguration<Collection>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Collection> entity)
|
|
{
|
|
// Slug is the natural key the sync upserts against.
|
|
entity.HasIndex(e => e.Slug).IsUnique();
|
|
}
|
|
}
|