Commit 4d316c2
authored
Bug fixes for Orleans Bank Account sample. (#7019)
* Bug fixes for Orleans Bank Account sample.
Balance now updates after Deposit or Withdraw operations.
Withdraw decrements now instead of incorrectly incrementing.
* Code Review suggestions and bug fixes.
Made Balance a class instead of a record as no benefit in using record here.
Added Id attribute to Balance.Value so that it is serialized and to allow state to be persisted after a Withdrawal.
Removed Reentrant attribute from AccountGrain as this could introduce race conditions when using Transactions.1 parent b0669e6 commit 4d316c2
1 file changed
Lines changed: 6 additions & 7 deletions
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
0 commit comments