using EntityFrameworkCore.Domain; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace EntityFrameworkCore.Data; public class LeagueConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { // This query filter will be always applied. // Note that you should call HasQueryFilter only once, otherwise the filter is overwritten. builder.HasQueryFilter(l => l.IsDeleted == false); builder.HasData( new League { Id = 1, Name = "Local League", CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33)}, new League { Id = 2, Name = "National League", CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33)}, new League { Id = 3, Name = "Geosphere", CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33)}, new League { Id = 4, Name = "Cyber war", CreatedDate = new DateTime(2025, 4, 6, 17, 7, 27, 33)} ); } }