What is the best way to seed data with a lot of information using EntityFramework Core?
问题 I have an entity configuration file and I seed data with the help of HasData , the example below. public class PublicationConfiguration : IEntityTypeConfiguration<Publication> { public void Configure(EntityTypeBuilder<Publication> builder) { builder.Property(p => p.Image) .HasMaxLength(256) .HasDefaultValue("default-publication.png") .IsRequired(); builder.Property(p => p.Title) .HasMaxLength(256) .IsRequired(); builder.Property(p => p.Value) .IsRequired(); builder.Property(p => p.PublisherId