public static void Set(TableName table, TableEntity value) { TableStoreEntity container = new TableStoreEntity(value); TableOperation insertOperation = TableOperation.Insert(container); CloudTable cloudTable = tables.Value[table.ToString()]; cloudTable.Execute(insertOperation); }
public static void Delete(TableName table, TableEntity value) { TableStoreEntity container = new TableStoreEntity(value); container.ETag = "*"; TableOperation deleteOperation = TableOperation.Delete(container); CloudTable cloudTable = tables.Value[table.ToString()]; cloudTable.Execute(deleteOperation); }
public static void Update(TableName table, TableEntity value) { TableStoreEntity container = new TableStoreEntity(value); container.ETag = "*"; container.Timestamp = DateTime.UtcNow; TableOperation updateOperation = TableOperation.InsertOrReplace(container); CloudTable cloudTable = tables.Value[table.ToString()]; cloudTable.Execute(updateOperation); }