diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-24 13:38:47 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-24 13:38:47 +0200 |
| commit | 64b768178dc9e64293a52c1b6d2631709af9502a (patch) | |
| tree | 6b7782fdbbbab4f734a1cb499cca03728c4f8f69 /Software/Visual_Studio/Tango.Web/ExtensionMethods | |
| parent | 028ab0e5cc2699ceec3e04b1eeab5f56b9b38083 (diff) | |
| download | Tango-64b768178dc9e64293a52c1b6d2631709af9502a.tar.gz Tango-64b768178dc9e64293a52c1b6d2631709af9502a.zip | |
Removed all refresh tokens use :/
Diffstat (limited to 'Software/Visual_Studio/Tango.Web/ExtensionMethods')
| -rw-r--r-- | Software/Visual_Studio/Tango.Web/ExtensionMethods/CloudTableExtensions.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Web/ExtensionMethods/CloudTableExtensions.cs b/Software/Visual_Studio/Tango.Web/ExtensionMethods/CloudTableExtensions.cs index 43c4804d3..ffffe6950 100644 --- a/Software/Visual_Studio/Tango.Web/ExtensionMethods/CloudTableExtensions.cs +++ b/Software/Visual_Studio/Tango.Web/ExtensionMethods/CloudTableExtensions.cs @@ -15,10 +15,10 @@ public static class CloudTableExtensions /// <param name="partitionKey">Partition key - i.e., last name</param> /// <param name="rowKey">Row key - i.e., first name</param> /// <returns>A Task object</returns> - public static async Task<T> GetEntityAsync<T>(this CloudTable table, string partitionKey, string rowKey) where T : class, ITableEntity + public static T GetEntity<T>(this CloudTable table, string partitionKey, string rowKey) where T : class, ITableEntity { TableOperation retrieveOperation = TableOperation.Retrieve<T>(partitionKey, rowKey); - TableResult result = await table.ExecuteAsync(retrieveOperation); + TableResult result = table.Execute(retrieveOperation); T customer = result.Result as T; return customer; } @@ -33,7 +33,7 @@ public static class CloudTableExtensions /// <param name="table">The sample table name</param> /// <param name="entity">The entity to insert or merge</param> /// <returns>A Task object</returns> - public static async Task<T> InsertOrUpdateEntityAsync<T>(this CloudTable table, T entity) where T : class, ITableEntity + public static T InsertOrUpdateEntity<T>(this CloudTable table, T entity) where T : class, ITableEntity { if (entity == null) { @@ -41,10 +41,10 @@ public static class CloudTableExtensions } // Create the InsertOrReplace table operation - TableOperation insertOrMergeOperation = TableOperation.InsertOrMerge(entity); + TableOperation insertOrMergeOperation = TableOperation.InsertOrReplace(entity); // Execute the operation. - TableResult result = await table.ExecuteAsync(insertOrMergeOperation); + TableResult result = table.Execute(insertOrMergeOperation); T insertedCustomer = result.Result as T; return insertedCustomer; @@ -56,7 +56,7 @@ public static class CloudTableExtensions /// <param name="table">Sample table name</param> /// <param name="deleteEntity">Entity to delete</param> /// <returns>A Task object</returns> - public static async Task DeleteEntityAsync<T>(this CloudTable table, T deleteEntity) where T : class, ITableEntity + public static void DeleteEntity<T>(this CloudTable table, T deleteEntity) where T : class, ITableEntity { if (deleteEntity == null) { @@ -64,6 +64,6 @@ public static class CloudTableExtensions } TableOperation deleteOperation = TableOperation.Delete(deleteEntity); - await table.ExecuteAsync(deleteOperation); + table.Execute(deleteOperation); } } |
