From 64b768178dc9e64293a52c1b6d2631709af9502a Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 24 Feb 2019 13:38:47 +0200 Subject: Removed all refresh tokens use :/ --- .../Tango.Web/ExtensionMethods/CloudTableExtensions.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Software/Visual_Studio/Tango.Web/ExtensionMethods') 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 /// Partition key - i.e., last name /// Row key - i.e., first name /// A Task object - public static async Task GetEntityAsync(this CloudTable table, string partitionKey, string rowKey) where T : class, ITableEntity + public static T GetEntity(this CloudTable table, string partitionKey, string rowKey) where T : class, ITableEntity { TableOperation retrieveOperation = TableOperation.Retrieve(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 /// The sample table name /// The entity to insert or merge /// A Task object - public static async Task InsertOrUpdateEntityAsync(this CloudTable table, T entity) where T : class, ITableEntity + public static T InsertOrUpdateEntity(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 /// Sample table name /// Entity to delete /// A Task object - public static async Task DeleteEntityAsync(this CloudTable table, T deleteEntity) where T : class, ITableEntity + public static void DeleteEntity(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); } } -- cgit v1.3.1