Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public static void DeletePostFromCosmos(string postId)
 {
     CosmosRepository <PostDTO> .DeleteItemAsync(postId);
 }