public void Update(string partitionKey, string rowKey, string url, string tag, string markerTime, string StorageConnectionString) { string TableName = "Markers"; // Retrieve the storage account from the connection string. CloudStorageAccount storageAccount = CloudStorageAccount.Parse(StorageConnectionString); // Create the table client. CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); // Retrieve a reference to the table. // Persist this http connection in the class var table = tableClient.GetTableReference(TableName); // Create the table if it doesn't exist. table.CreateIfNotExists(); TableOperation retrieveOperation = TableOperation.Retrieve <MarkerEntity>(partitionKey, rowKey); TableResult retrievedResult = table.Execute(retrieveOperation); MarkerEntity updateEntity = (MarkerEntity)retrievedResult.Result; if (updateEntity != null) { //Change the description updateEntity.FileName = url; updateEntity.Tag = tag; updateEntity.MarkerTime = markerTime; // Create the InsertOrReplace TableOperation TableOperation insertOrReplaceOperation = TableOperation.InsertOrReplace(updateEntity); // Execute the operation. table.Execute(insertOrReplaceOperation); } }
public void Update(string PatientID, string RowKey, string Url, string Tag, string markerTime, string StorageConnectionString) { var me = new MarkerEntity(); me.Update(PatientID, RowKey, Url, Tag, markerTime, StorageConnectionString); }