Skip to content

Commit a1abf09

Browse files
committed
Update mode on table partition should set table repository mode
By not setting the value in the underlying table, when setting the value via a property setter, we ended up not honoring it at all.
1 parent bf9ff04 commit a1abf09

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/TableStorage/TablePartition`1.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ protected internal TablePartition(TableConnection tableStorage, string partition
5252
/// <summary>
5353
/// The <see cref="TableUpdateMode"/> to use when updating an existing entity.
5454
/// </summary>
55-
public TableUpdateMode UpdateMode { get; set; }
55+
public TableUpdateMode UpdateMode
56+
{
57+
get => repository.UpdateMode;
58+
set => repository.UpdateMode = value;
59+
}
5660

5761
/// <summary>
5862
/// The strategy to use when updating an existing entity.
@@ -61,8 +65,8 @@ protected internal TablePartition(TableConnection tableStorage, string partition
6165
public UpdateStrategy UpdateStrategy
6266
{
6367
// Backs-compatible implementation
64-
get => UpdateMode == TableUpdateMode.Replace ? UpdateStrategy.Replace : UpdateStrategy.Merge;
65-
set => UpdateMode = value.UpdateMode;
68+
get => repository.UpdateStrategy;
69+
set => repository.UpdateStrategy = value;
6670
}
6771

6872
/// <inheritdoc />

0 commit comments

Comments
 (0)