Пример #1
0
        private async Task AddSpeakersToTalkAsync(JToken jTokenLinks, Talk talk)
        {
            var speakerLinks = GetSpeakersLinks(jTokenLinks["links"]);

            foreach (var speakerLink in speakerLinks)
            {
                var speaker = await GetSpeakerFromUrl(speakerLink);

                talk.AddSpeaker(speaker);
            }
        }
Пример #2
0
        private async Task SetSpeakersId(List <string> speakersList, Talk talk)
        {
            StringBuilder spIds = new StringBuilder();

            foreach (var sName in speakersList)
            {
                var speaker = await _speakerRepository.GetSpeakerByName(sName);

                if (speaker != null)
                {
                    talk.AddSpeaker(speaker.Id);
                }
            }
        }