15 lines
465 B
C#
15 lines
465 B
C#
using BlueLaminate.EFCore.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace BlueLaminate.EFCore.Configurations;
|
|
|
|
public class ScrapeRunConfiguration : IEntityTypeConfiguration<ScrapeRun>
|
|
{
|
|
public void Configure(EntityTypeBuilder<ScrapeRun> entity)
|
|
{
|
|
// The throttle check looks up the most recent run for a given source.
|
|
entity.HasIndex(e => new { e.Source, e.RanAt });
|
|
}
|
|
}
|