I'm storing an image in the blobstorage and information about that image in the tablestorage. The table rowkey is the image name. I want to change the image description(rowkey) for the selected item.
//string name is the bloburl, string description is the new image description
public ActionResult UpdateImageDescription(string Name, string ImageDescription)
{
//Get blob url
Uri bloburi = new Uri(Name);
string filename = System.IO.Path.GetFileName(bloburi.LocalPath);
//Get tabledata and make it a list
CloudTable table = tableStorageServices.GetCloudTable();
TableQuery<ImageEntity> query = new TableQuery<ImageEntity>();
foreach (ImageEntity entity in table.ExecuteQuery(query))
{
//find the matching urls
if (bloburi.ToString() == entity.Url)
{
entity.ImageDescription = ImageDescription;
break;
}
}
I've debugged the program and i can see that the imagedescription and the new imagedescription is right, but it seems like it's not saving the change.
Thank you for helping me. I'm still a newbie @azure so be patient with me:)