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