Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

This is a summary of the changes in #7510, which obsoletes the old saga mapping API in favor of the MapSaga() fluent syntax.

Breaking Change

The old ConfigureMapping<T>().ToSaga() pattern is now a compile-time error. Use MapSaga().ToMessage<T>() instead.

Before:

mapper.ConfigureMapping<Msg>(m => m.OrderId).ToSaga(s => s.OrderId);
mapper.ConfigureHeaderMapping<Msg>("Header").ToSaga(s => s.OrderId);

After:

mapper.MapSaga(s => s.OrderId)
    .ToMessage<Msg>(m => m.OrderId)
    .ToMessageHeader<Msg>("Header");

Changes

  • Obsoleted APIs (error: true): ConfigureMapping<T>(), ConfigureHeaderMapping<T>(), IToSagaExpression<T>, ToSagaExpression<T,M>
  • Removed: RewriteConfigureHowToFindSagaFixer.cs, NSB0018 diagnostic, old syntax parsing in SagaAnalyzer
  • Removed internal types: ToSagaExpression.cs, IToSagaExpression.cs, MessageHeaderToSagaExpression.cs
  • Updated: All saga tests (52 files) converted to new syntax

Stats

+370/-1,862 lines across 52 files. Labeled as breaking change, targeted at vNext milestone.

Original prompt

Summarize changes in #7510


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update transport connection handling in NServiceBus Summary of PR #7510: Obsolete old saga mapping API Nov 25, 2025
Copilot AI requested a review from andreasohlund November 25, 2025 17:31
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.

2 participants