Skip to content

Releases: danellalc/EFCore.AutoSeed

v3.0.0

Choose a tag to compare

@danellalc danellalc released this 08 Aug 20:41

Two parts: an audit pass over the pipeline (six real bugs, each reproduced against a real model shape first, then fixed with a dedicated test), and two new opt-in capabilities requested directly off the back of that audit. Three of the six fixes are breaking because the previous behavior was either silently wrong or crashed with a raw, unnamed exception; the other three are pure fixes with no change to already-correct generated data. Neither new capability changes what an existing call generates.

Breaking

  • An optional (nullable) foreign key outside a dependency cycle is now actually populated, following the same NullRate as any other nullable column, instead of always staying null.
  • A required EF Core 8+ complex property (ComplexProperty, including a nested one) now throws UnsupportedPropertyException naming the full path, instead of being silently left at its CLR default.
  • Two entity types genuinely table-split into the same table now throw UnsupportedEntityTypeException instead of each getting its own, independently generated row.

Added

  • AUTOSEED001: a Roslyn analyzer bundled directly in the EFCore.AutoSeed package, flagging a required self-referencing foreign key directly in the IDE.
  • Entity<T>().SeedWith(rows): seeds a lookup table with an exact, literal set of rows instead of generated ones. AutoSeedAsync only for now.
  • autoseed diff (CLI) and AutoSeedDiff.Compare (library): diffs the seeding plan against a saved baseline, so a model change that alters what gets seeded shows up as an explicit, reviewable diff. Exits non-zero for use as a CI gate.

Fixed

  • An OwnsMany owned collection is now reported in SkippedEntityTypes instead of being silently, unexplainedly left empty.
  • An implicit many-to-many join table no longer crashes the entire seeding call with a raw TargetParameterCountException.
  • A SQL Server temporal table no longer crashes AutoSeedFastAsync.

Full changelog: https://github.com/danellalc/EFCore.AutoSeed/blob/main/CHANGELOG.md

v2.0.1

Choose a tag to compare

@danellalc danellalc released this 08 Aug 06:20

Fixed

  • The README's demo GIF now renders on NuGet.org: it referenced demo.gif by a relative path, which NuGet.org's README renderer never resolves regardless of whether the file is bundled in the package, only an absolute URL from a trusted host (raw.githubusercontent.com) works. No code change.

NuGet: https://www.nuget.org/packages/EFCore.AutoSeed/2.0.1

v2.0.0

Choose a tag to compare

@danellalc danellalc released this 08 Aug 06:12

Breaking

Generated data changes for models with a required DateTime, DateOnly, TimeOnly, TimeSpan or byte[] property that no name-specific rule recognized. Previously such a property was silently left at its CLR default, or reached the database as a raw, unnamed provider exception if the column was NOT NULL. Five new generic inference rules now give it a real value. Same seed, same shape of model: different generated value than v1.0.0 produced.

Added

  • AutoSeedAsync and AutoSeedFastAsync accept an optional configure callback (Action<SeedConfigurationBuilder>):
    • Entity<T>().Exclude(): reads an entity type's already-existing rows from the database instead of generating new ones, and uses them as valid foreign key targets for anything that requires one.
    • Entity<T>().HasRowCount(n): pins an entity type's row count regardless of scale.
    • Entity<T>().Property(x => x.Y).GenerateWith((random, generatedValues) => ...): replaces every built-in rule for one property with a supplied delegate.
  • UnsupportedPropertyException, UnsupportedSeedConfigurationException, InvalidSeedConfigurationException.

Fixed

  • demo.gif in the README is now packed into both published packages, and shows a real, repeated, deterministic measurement instead of a placeholder.

Full changelog: https://github.com/danellalc/EFCore.AutoSeed/blob/main/CHANGELOG.md

NuGet: https://www.nuget.org/packages/EFCore.AutoSeed/2.0.0

v1.0.0

Choose a tag to compare

@danellalc danellalc released this 08 Aug 06:12

Initial release: AutoSeedAsync, AutoSeedExplainAsync, AutoSeedCoverageAsync, AutoSeedFastAsync, AutoSeedFromShapeAsync/CaptureShapeAsync, AutoSeedOptions, the autoseed CLI, SQL Server and PostgreSQL support.

NuGet: https://www.nuget.org/packages/EFCore.AutoSeed/1.0.0