public void Create(InstagramFeed.ImageVote image) { InstagramFeed.Parse.ImageVote persistedVote = new InstagramFeed.Parse.ImageVote { instagramImageId = image.instagramImageId, voterId = image.voterId }; _client.CreateObject(persistedVote); }
public void Create(InstagramFeed.ImageVote image) { InstagramFeed.Azure.ImageVote persistedVote = new InstagramFeed.Azure.ImageVote { instagramImageId = image.instagramImageId, RowKey = Guid.NewGuid().ToString(), voterId = image.voterId }; // Create the CloudTable object that represents the "people" table. // Create the table client. CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.AppSettings["StorageConnectionString"]); CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); CloudTable table = tableClient.GetTableReference("ImageVote"); TableOperation insertOperation = TableOperation.Insert(persistedVote); table.Execute(insertOperation); }