<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-handle-multiple-commands-in-the-same-transaction-k15e3ull7" -->

---
title: How to handle multiple commands in the same transaction
description: When building systems that need to handle multiple commands in a single transaction, the classical event-driven approach using sagas and outbox patterns can be...
canonical: https://daily.dev/posts/how-to-handle-multiple-commands-in-the-same-transaction-k15e3ull7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to handle multiple commands in the same transaction | daily.dev
og:description: When building systems that need to handle multiple commands in a single transaction, the classical event-driven approach using sagas and outbox patterns can be...
og:url: https://daily.dev/posts/how-to-handle-multiple-commands-in-the-same-transaction-k15e3ull7
og:image: https://api.daily.dev/og/posts/K15e3uLl7.png
og:image:alt: How to handle multiple commands in the same transaction
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to handle multiple commands in the same transaction

**[Event-Driven by Oskar Dudycz](https://daily.dev/sources/event-driven-io)** · 9 min read · 0 upvotes · 0 comments

## Summary

When building systems that need to handle multiple commands in a single transaction, the classical event-driven approach using sagas and outbox patterns can be overkill for smaller projects. Using C# and Marten as examples, this post walks through refactoring a workspace creation flow that triggers both a workspace and a default project creation. The approach separates business logic into dedicated services (WorkspaceService, ProjectService), introduces a composition helper, and optionally extracts a Domain Service (WorkspaceCreationScenario) to orchestrate multi-aggregate operations explicitly. The post also covers separating command handling from queries using HTTP 201 + Location header, and advises treating this synchronous transactional pattern as a pragmatic starting point that can later be replaced with async coordination (Saga) if write amplification or concurrency issues arise.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://event-driven.io/en/simple_transactional_command_orchestration>

## Similar posts on daily.dev

- [When Your Use Case Half-Succeeds: Designing for Partial Failure in .NET](https://daily.dev/posts/when-your-use-case-half-succeeds-designing-for-partial-failure-in-net-incurg0n9) · Milan Jovanović · 21 upvotes · 0 comments
- [Implementing the Saga Pattern With Wolverine](https://daily.dev/posts/implementing-the-saga-pattern-with-wolverine-niv9jzsc8) · Milan Jovanović · 15 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#c#](https://daily.dev/tags/c#), [#domain-driven-design](https://daily.dev/tags/domain-driven-design)

[View this post on daily.dev](https://daily.dev/posts/how-to-handle-multiple-commands-in-the-same-transaction-k15e3ull7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to handle multiple commands in the same transaction","url":"https://daily.dev/posts/how-to-handle-multiple-commands-in-the-same-transaction-k15e3ull7","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-handle-multiple-commands-in-the-same-transaction-k15e3ull7"},"datePublished":"2026-06-17T11:26:16.718Z","dateModified":"2026-06-17T11:32:57.347Z","description":"When building systems that need to handle multiple commands in a single transaction, the classical event-driven approach using sagas and outbox patterns can be...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9e7ab3f8cb1dcd6151016fda4135d885?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9e7ab3f8cb1dcd6151016fda4135d885?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Event-Driven by Oskar Dudycz","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Event-Driven by Oskar Dudycz","logo":"https://media.daily.dev/image/upload/s--unDKCFQ0--/f_auto,q_auto/v1781695550/logos/event-driven-io?_a=BAMAMiWQ0","url":"https://daily.dev/sources/event-driven-io"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-handle-multiple-commands-in-the-same-transaction-k15e3ull7","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,c#,domain-driven-design","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Event-Driven by Oskar Dudycz","item":"https://daily.dev/sources/event-driven-io"},{"@type":"ListItem","position":3,"name":"How to handle multiple commands in the same transaction"}]}
```

