Skip to content

Samples: Adds DistributedTransaction cross-container transfer sample#5915

Open
absaAbhishekSahu wants to merge 1 commit into
Azure:mainfrom
absaAbhishekSahu:users/absa/distributed-transaction-sample
Open

Samples: Adds DistributedTransaction cross-container transfer sample#5915
absaAbhishekSahu wants to merge 1 commit into
Azure:mainfrom
absaAbhishekSahu:users/absa/distributed-transaction-sample

Conversation

@absaAbhishekSahu
Copy link
Copy Markdown
Contributor

Adds a sample application demonstrating a cross-container banking scenario with three containers:

  • USBankAccounts: Contoso with $100 USD
  • CanadianAccounts: Contoso with $0 CAD
  • ExchangeRates: USDToCAD rate of 1.38

The sample:

  1. Seeds initial data using standard CRUD operations
  2. Reads and prints all container values using non-DTX point reads
  3. Performs an atomic cross-container transfer using DistributedWriteTransaction with a conditional write (ETag) on the exchange rate to ensure rate == 1.38

Pull Request Template

Description

Please include a summary of the change and which issue is fixed. Include samples if adding new API, and include relevant motivation and context. List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #IssueNumber

Changelog

  • I have added a changelog entry under ### Unreleased in changelog.md
    for the user-facing impact of this change.
  • No changelog entry is required because this PR is one of:
    documentation-only, test-only, CI / build-only, or a pure internal refactor
    with no observable customer impact.

If the second box is checked, briefly justify here:

Adds a sample application demonstrating a cross-container banking scenario
with three containers:
- USBankAccounts: Contoso with $100 USD
- CanadianAccounts: Contoso with $0 CAD
- ExchangeRates: USDToCAD rate of 1.38

The sample:
1. Seeds initial data using standard CRUD operations
2. Reads and prints all container values using non-DTX point reads
3. Performs an atomic cross-container transfer using DistributedWriteTransaction
   with a conditional write (ETag) on the exchange rate to ensure rate == 1.38

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant