Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove implicit save changes in mocha ef core middleware - #9501

#9501
Merged
PascalSenn merged 2 commits into
mainChilliCream/graphql-platform:mainfrom
pse/fix-mediator-transaction-middlewareChilliCream/graphql-platform:pse/fix-mediator-transaction-middlewareCopy head branch name to clipboard
Apr 2, 2026
Merged

Remove implicit save changes in mocha ef core middleware#9501
PascalSenn merged 2 commits into
mainChilliCream/graphql-platform:mainfrom
pse/fix-mediator-transaction-middlewareChilliCream/graphql-platform:pse/fix-mediator-transaction-middlewareCopy head branch name to clipboard

Conversation

@PascalSenn

@PascalSenn PascalSenn commented Apr 2, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 2, 2026 12:26
@github-actions github-actions Bot added the 📚 documentation This issue is about working on our documentation. label Apr 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the implicit DbContext.SaveChangesAsync call from Mocha’s EF Core transaction middleware and updates the documentation to reflect that command handlers must persist changes explicitly.

Changes:

  • Removed automatic SaveChangesAsync invocation from EntityFrameworkTransactionMiddleware before committing.
  • Updated the middleware XML docs to clarify that handlers must call SaveChangesAsync.
  • Updated the mediator pipeline documentation and EF transaction section to describe the new responsibility split (handlers save; middleware manages transaction lifecycle).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
website/src/docs/mocha/v1/mediator/pipeline-and-middleware.md Updates the transaction middleware examples/description to remove implicit saving and clarify handler responsibilities.
src/Mocha/src/Mocha.EntityFrameworkCore/EntityFrameworkTransactionMiddleware.cs Removes implicit SaveChangesAsync calls and updates XML docs accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread website/src/docs/mocha/v1/mediator/pipeline-and-middleware.md Outdated
@PascalSenn
PascalSenn merged commit e2478ff into main Apr 2, 2026
3 checks passed
@PascalSenn
PascalSenn deleted the pse/fix-mediator-transaction-middleware branch April 2, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.