Skip to content

Commit 4ea1893

Browse files
committed
Remove Create factory methods that cause ambiguous matches
Fixes #52
1 parent fca07b8 commit 4ea1893

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/TableStorage/TablePartition.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@ public static ITablePartition<ITableEntity> Create(CloudStorageAccount storageAc
4141
/// <typeparam name="T">The type of entity that the repository will manage.</typeparam>
4242
/// <param name="storageAccount">The storage account to use.</param>
4343
/// <param name="rowKey">Function to retrieve the row key for a given entity.</param>
44-
/// <param name="updateStrategy">Strategy to apply when updating an existing entity. Defaults to <see cref="UpdateStrategy.Replace"/>.</param>
4544
/// <returns>The new <see cref="ITablePartition{T}"/>.</returns>
4645
public static ITablePartition<T> Create<T>(
4746
CloudStorageAccount storageAccount,
48-
Expression<Func<T, string>> rowKey,
49-
UpdateStrategy? updateStrategy = default) where T : class
50-
=> Create<T>(storageAccount, DefaultTableName, default, rowKey, updateStrategy);
47+
Expression<Func<T, string>> rowKey) where T : class
48+
=> Create<T>(storageAccount, DefaultTableName, default, rowKey);
5149

5250
/// <summary>
5351
/// Creates an <see cref="ITablePartition{T}"/> for the given entity type
@@ -58,14 +56,12 @@ public static ITablePartition<T> Create<T>(
5856
/// <param name="storageAccount">The storage account to use.</param>
5957
/// <param name="tableName">Table name to use.</param>
6058
/// <param name="rowKey">Function to retrieve the row key for a given entity.</param>
61-
/// <param name="updateStrategy">Strategy to apply when updating an existing entity. Defaults to <see cref="UpdateStrategy.Replace"/>.</param>
6259
/// <returns>The new <see cref="ITablePartition{T}"/>.</returns>
6360
public static ITablePartition<T> Create<T>(
6461
CloudStorageAccount storageAccount,
6562
string tableName,
66-
Expression<Func<T, string>> rowKey,
67-
UpdateStrategy? updateStrategy = default) where T : class
68-
=> Create<T>(storageAccount, tableName, default, rowKey, updateStrategy);
63+
Expression<Func<T, string>> rowKey) where T : class
64+
=> Create<T>(storageAccount, tableName, default, rowKey);
6965

7066
/// <summary>
7167
/// Creates an <see cref="ITablePartition{T}"/> for the given entity type

src/TableStorage/TableRepository.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,12 @@ public static ITableRepository<ITableEntity> Create(
3838
/// <param name="storageAccount">The storage account to use.</param>
3939
/// <param name="partitionKey">Function to retrieve the partition key for a given entity.</param>
4040
/// <param name="rowKey">Function to retrieve the row key for a given entity.</param>
41-
/// <param name="updateStrategy">Strategy to apply when updating an existing entity. Defaults to <see cref="UpdateStrategy.Replace"/>.</param>
4241
/// <returns>The new <see cref="ITableRepository{T}"/>.</returns>
4342
public static ITableRepository<T> Create<T>(
4443
CloudStorageAccount storageAccount,
4544
Expression<Func<T, string>> partitionKey,
46-
Expression<Func<T, string>> rowKey,
47-
UpdateStrategy? updateStrategy = default) where T : class
48-
=> Create<T>(storageAccount, typeof(T).Name, partitionKey, rowKey, updateStrategy);
45+
Expression<Func<T, string>> rowKey) where T : class
46+
=> Create<T>(storageAccount, typeof(T).Name, partitionKey, rowKey);
4947

5048
/// <summary>
5149
/// Creates an <see cref="ITableRepository{T}"/> for the given entity type

0 commit comments

Comments
 (0)