Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction boundary issue in InternalController.Create() #230

Open
ayende opened this issue Jun 30, 2021 · 3 comments
Open

Transaction boundary issue in InternalController.Create() #230

ayende opened this issue Jun 30, 2021 · 3 comments

Comments

@ayende
Copy link

ayende commented Jun 30, 2021

See here:

https://github.com/banksystembg/BankSystem/blob/master/src/Web/BankSystem.Web/Areas/MoneyTransfers/Controllers/InternalController.cs#L97-L127

You have two calls to CreateMoneyTransferAsync(), one to withdraw the money and the other to deposit it.
However, they are done as two separate database transactions, which means that you have the option of partial transaction.

@melikpehlivanov
Copy link
Member

Hello, @ayende.
After reviewing what you said, I've came to the conclusion that you're totally right, unfortunately we don't have time to fix this issue at the moment. Feel free to open a PR if you'd like to help us :)

@ayende
Copy link
Author

ayende commented Aug 8, 2021

I actually run into that when using the system to demo Entity Framework Profiler. I used that to showcase how I can find those sort of issues. Thanks for providing the code, it made for a great demo for real world system.

@melikpehlivanov
Copy link
Member

Glad to hear that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants