public static async Task <bool> DeleteTrack(string trackId) { // decrement the count var track = await GetTrack(trackId); ExtendedUserRepository.DecrementTrackCount(track.PartitionKey, track.is_private); // send messages to queue TableStorageRepository.AddMessageToQueue("delete-posts-from-track", trackId); TableStorageRepository.AddMessageToQueue("delete-tracktags-from-track", trackId); // then delete track cosmos CosmosRepository <Track> .DeleteItemAsync(trackId); // then delete profile pics DeleteImages(trackId); // then delete from table storage, and return return(await TableStorageRepository.DeleteTrack(trackId)); }
public static void DeletePostFromCosmos(string postId) { CosmosRepository <PostDTO> .DeleteItemAsync(postId); }