Releases: EFNext/ExpressiveSharp
Releases · EFNext/ExpressiveSharp
Release list
v0.9.0
New features
- Runtime polymorphic dispatch for virtual/
override[Expressive]members. Expansion now discovers derived[Expressive]overrides at query time and emits a runtime type-test chain —entity is Dog ? "Dog: " + ((Dog)entity).Name : "Animal: " + entity.Name— so each row uses its runtime type's body. EF Core translates theischecks to a table-per-hierarchy discriminatorCASE; in-memory delegates and MongoDB get the same conditional. Discovery happens at runtime, so it works across assemblies and never goes stale, unlike compile-time approaches. - New analyzer EXP0032 (Warning) — flags a derived
overrideof an[Expressive]member that forgets[Expressive](such an override is invisible to expansion and silently falls back to the base body for that type's rows). Ships with an "Add[Expressive]" code fix. - Opt-out switch —
DisablePolymorphicDispatch()— reverts to static (declared-type) expansion, e.g. for providers that can't translate type tests. EF Core:UseExpressives(o => o.DisablePolymorphicDispatch()); standalone:new ExpressiveOptions().DisablePolymorphicDispatch(). To opt out a single override instead, mark it[NotExpressive].
Breaking changes
- Virtual/
override[Expressive]members now dispatch polymorphically instead of always inlining the base body. Queries over a hierarchy that previously returned the base body for every row (and SQL with no discriminator branch) will now return per-runtime-type results and emit aCASE. This is more correct, but it changes query results and generated SQL. Opt out per-override with[NotExpressive], or globally withDisablePolymorphicDispatch(). - EXP0024 retired. Virtual
[Expressive]members no longer emit the "will not dispatch polymorphically" warning (the ID is reserved, not reused). Remove anyEXP0024entries from.editorconfig,<NoWarn>, or#pragma. Its derived-side successor is EXP0032. See docs/reference/diagnostics.md.
Maintenance
- Suppressed the NuGet audit advisory for the transitive
SQLitePCLRaw.lib.e_sqlite3package (CVE-2025-6965) in non-packable projects sodotnet restore/CI isn't blocked while no patched upstream package exists. Internal/build only — no change to the shipped packages.
Full Changelog: v0.8.0...v0.9.0
v0.8.0
New features
- virtual/abstract/override [Expressive] members are now allowed. They expand using the static (declared) type of the receiver, so an overridden body is not used by query providers (EF Core, MongoDB). The new EXP0024 warning flags these and suggests workarounds (test the runtime type with a switch, or move the logic into a non-virtual static/extension method). (#66)
- New analyzer EXP0029 (Info) — flags where an IExpressiveQueryable chain is silently dropped back to a plain IQueryable, losing [Expressive] expansion downstream. Includes a code fix. (#69)
Bug fixes
- Average window function over nullable int?/long? now casts to floating point — no more integer-divided results (e.g. 1 instead of 1.5). (#67)
- UnionBy interceptor stub had its second parameter mistyped as IEnumerable instead of IEnumerable, breaking interception. (#68)
- Nested-lambda variable collision in multi-lambda interceptors (Join/GroupJoin) emitted duplicate locals → CS0128. Parameter names are now per-lambda prefixed. (#70)
- Stale incremental cache on cross-file edits in ExpressiveGenerator, plus a separate cache-busting fix in PolyfillInterceptorGenerator. (#71, #73)
- EF Core async terminals (ToListAsync/ToArrayAsync/etc.) now work directly on Include/ThenInclude chains and AsExpressiveDbSet() sets, without tripping the .NET 10 IAsyncEnumerable ambiguity. (#72)
Breaking changes
- Diagnostic IDs were renumbered into a contiguous EXP0001–EXP0024 range. EXP0001–EXP0012 are unchanged; the [ExpressiveFor], [ExpressiveProperty], and "unsupported operation ignored" codes all shifted down. If you reference or suppress any of these in .editorconfig, , or #pragma, update them against docs/reference/diagnostics.md. (#69)
- Virtual [Expressive] members now emit EXP0024. With TreatWarningsAsErrors, members that were previously silently ignored will now fail the build until resolved or suppressed. (#66)
Full Changelog: v0.7.3...v0.8.0
v0.7.3
v0.7.2
v0.7.1
What's Changed
- Add support for nullable enums in expressive properties by @koenbeuk in #61
- Fix C# 14 extension members in [Expressive] generation by @koenbeuk in #62
Full Changelog: v0.7.0...v0.7.1
v0.7.0
This particular release adds OpenTelemetry (Meter/ActivitySource) as well as an EventSource for debugging issues (docs provided). I intend for this library to be feature complete at this point and ready for a proper V1 release
What's Changed
- Various documentation tweaks by @koenbeuk in #55
- Stabilize RelationalExtensions by @koenbeuk in #56
- Add hot reload support for EF Core and MongoDB integrations by @koenbeuk in #58
- Add telemetry support for diagnostics by @koenbeuk in #57
Full Changelog: v0.6.5...v0.7.0
v0.6.5
v0.6.4
v0.6.3
v0.6.2
What's Changed
- Fix bugs related to nullable types and generic parameters by @koenbeuk in #49
- Add NotExpressive attribute and related analyzer by @koenbeuk in #48
Full Changelog: v0.6.1...v0.6.2