Migration Guides (v1 -> v2) — Mediator
Upgrade checklist from published NuGet v1.0.0 → v2.0.0 (BC-001–BC-007).
Migrating v1.0.0 to v2.0.0 (BC-001–BC-007)
Section titled “Migrating v1.0.0 to v2.0.0 (BC-001–BC-007)”- Default DI lifetime changed to
Scoped(BC-001/ADR-037):AddEricksonLopezMediator()now defaults toServiceLifetime.Scopedinstead ofSingletonso handlers safely consume scopedDbContext/transaction services. PassServiceLifetime.Singletonexplicitly if singleton dispatch is desired. - Migrate away from
EricksonLopez.Mediator.Polly(BC-007/ADR-036): Replace[Obsolete]EricksonLopez.Mediator.PollywithEricksonLopez.Resilience.Mediator(AddResiliencePipelineBehavior()+IResilientRequest). - FluentValidation AOT isolation: Prefer generic
AddMediatorFluentValidationValidator<TValidator, TRequest>()over reflection-basedAddMediatorFluentValidatorsFromAssembly(...)in Native AOT apps.
Note on Unreleased Local v3.0.0–v3.2.0 (BC-008–BC-012)
Section titled “Note on Unreleased Local v3.0.0–v3.2.0 (BC-008–BC-012)”Local workspace 3.2.0 (unpublished on NuGet) adds ELM013 immutable request enforcement and EricksonLopez.Mediator.Caching.