public void Add(Ad ad) { TableOperation insertOperation = TableOperation.Insert(ad); ad.AdId = Guid.NewGuid(); // Execute the operation. this.Table.Execute(insertOperation); }
private async Task DeleteAdBlobsAsync(Ad ad) { if (!string.IsNullOrWhiteSpace(ad.ImageURL)) { Uri blobUri = new Uri(ad.ImageURL); await DeleteAdBlobAsync(blobUri); } if (!string.IsNullOrWhiteSpace(ad.ThumbnailURL)) { Uri blobUri = new Uri(ad.ThumbnailURL); await DeleteAdBlobAsync(blobUri); } }