I cannot update table objects using using Microsoft.Azure.CosmosDB.Table and get the following exception. "Message: The requested resource is no longer available at the server." Code: Gone I can run selects without issue.
Using namespace Microsoft.WindowsAzure I can do queries and updates. Also this code works against devdb storage or if I change connection string to Azure Table storage. The only thing that does not work is pointing to CosmosDb.
`
Microsoft.Azure.Storage;
using Microsoft.Azure.CosmosDB.Table;
namespace AzureTester
{
class Program
{
static void Main(string[] args)
{
//cosmosdb.azure these don't work for TableOperation.InsertOrMerge(x). They do for Selects
var connectionString = "........TableEndpoint=https://*****.table.cosmosdb.azure.com:443/;";
//table storage or dev this works for everything
//var connectionString = ".....EndpointSuffix=core.windows.net";
//var connectionString = "UseDevelopmentStorage=true;";
var storageAccount = CloudStorageAccount.Parse(connectionString);
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
var table = tableClient.GetTableReference("Boat");
TableQuery<Boat> query = new TableQuery<Boat>()
.Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "jack"));
var returnedBoat = table.ExecuteQuerySegmentedAsync<Boat>(query, null).Result; //this always works.
Boat x = new Boat();
x.PartitionKey = "jack";
x.RowKey = "black";
x.Type = "dragon";
TableOperation insertOrMergeOperation = TableOperation.InsertOrMerge(x);
//hangs on this line when connection string is cosmosdb.azure.com
TableResult result = table.Execute(insertOrMergeOperation);
Boat inserted = result.Result as Boat;
}