19 lines
754 B
C#

using EntityFrameworkCore.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace EntityFrameworkCore.Data;
public class LeagueConfiguration : IEntityTypeConfiguration<League>
{
public void Configure(EntityTypeBuilder<League> builder)
{
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)}
);
}
}