Skip to content

Add EnrichEventsAsync hook to EventProjection#4229

Merged
jeremydmiller merged 1 commit intomasterfrom
feature/4143-event-projection-enrichment
Apr 6, 2026
Merged

Add EnrichEventsAsync hook to EventProjection#4229
jeremydmiller merged 1 commit intomasterfrom
feature/4143-event-projection-enrichment

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

  • Add EnrichEventsAsync(IQuerySession, IReadOnlyList<IEvent>, CancellationToken) virtual method to EventProjection
  • Called before individual event processing for both inline and async lifecycles
  • Enables batch-loading reference data to avoid N+1 queries
  • Documentation added to event-projections.md with usage example

Depends on JasperFx/jasperfx#176

Closes #4143

Test plan

  • 3 integration tests: simple enrichment, database lookup enrichment, call order verification
  • All tests pass with inline lifecycle

🤖 Generated with Claude Code

- Upgrade JasperFx.Events to 1.26.0 which adds EnrichEventsAsync to
  JasperFxEventProjectionBase, called before individual event processing
  for both inline and async lifecycles
- 3 integration tests verifying enrichment works (simple, DB lookup, call order)
- Documentation added to docs/events/projections/event-projections.md

Closes #4143

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller force-pushed the feature/4143-event-projection-enrichment branch from dd068e8 to 5065b0e Compare April 6, 2026 16:19
jeremydmiller added a commit to JasperFx/polecat that referenced this pull request Apr 6, 2026
- Upgrade JasperFx.Events to 1.26.0 which adds EnrichEventsAsync to
  JasperFxEventProjectionBase
- 3 integration tests verifying enrichment works (simple, DB lookup, call order)

Mirror of JasperFx/marten#4229

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit d5ba733 into master Apr 6, 2026
6 checks passed
@jeremydmiller jeremydmiller deleted the feature/4143-event-projection-enrichment branch April 6, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an event enrichment hook to EventProjection

1 participant