Add init weapon scraper
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user