Exemplo n.º 1
0
        public async Task StoreWordCounterEpisode(int episodeId, SrStoredWordCountEpisode episode)
        {
            await _episodeWordCountTable.CreateIfNotExistsAsync();

            var entity = new SrStoredWordCountEpisodeEntity(episodeId, episode);
            var insertOrMergeOperation = TableOperation.InsertOrMerge(entity);
            await _episodeWordCountTable.ExecuteAsync(insertOrMergeOperation);
        }
Exemplo n.º 2
0
            public SrStoredWordCountEpisodeEntity(int episodeId, SrStoredWordCountEpisode episode)
            {
                PartitionKey = "SrStoredWordCountEpisode";
                RowKey       = episodeId.ToString("D");

                EpisodeId = episodeId;

                EpisodeAudioUrl               = episode.EpisodeAudioUrl;
                EpisodeAudioLocale            = episode.EpisodeAudioLocale;
                EpisodeAudioDurationInSeconds = episode.EpisodeAudioDurationInSeconds;

                EpisodeTitle = episode.EpisodeTitle;
                EpisodeUrl   = episode.EpisodeUrl;

                EpisodePublishDateUtc = episode.EpisodePublishDateUtc;

                ProgramId   = episode.ProgramId;
                ProgramName = episode.ProgramName;

                EpisodeAudioTranscription = episode.EpisodeAudioTranscription;

                WordCount = episode.WordCount;
            }