protected override void OnModelCreating(ModelBuilder modelBuilder) { var entityInfos = _entityInfo.GetEntitiesTypeInfo(); if (entityInfos.IsNullOrEmpty()) { return; } foreach (var info in entityInfos) { if (info.DataSeeding is null) { modelBuilder.Entity(info.Type); } else { modelBuilder.Entity(info.Type).HasData(info.DataSeeding); } } var assembly = entityInfos.First().Type.Assembly; modelBuilder.ApplyConfigurationsFromAssembly(assembly); SetComment(modelBuilder, entityInfos); }