// Retrieve a reference to a table CloudTable table = storageAccount.CreateCloudTableClient().GetTableReference("mytable"); // Define a query filter string queryFilter = TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "myPartitionKey"); // Create a query object TableQueryquery = new TableQuery ().Where(queryFilter); // Execute the query against the table IEnumerable results = table.ExecuteQuery(query);
// Create an instance of an entity to delete MyEntity entityToDelete = new MyEntity("partitionKey", "rowKey"); // Retrieve a reference to a table CloudTable table = storageAccount.CreateCloudTableClient().GetTableReference("mytable"); // Create a table operation to delete the entity TableOperation deleteOperation = TableOperation.Delete(entityToDelete); // Execute the delete operation against the table TableResult result = table.Execute(deleteOperation);In both examples, the Execute method is called on the CloudTable object and passed a TableQuery or TableOperation object, respectively. This method is able to directly interact with the table storage service to perform the requested operation.