Ejemplo n.º 1
0
        public async Task <TalksByUser> GetTalksBySpeaker(string speakerName)
        {
            var talks = await conferencePersistence.GetTalksFromConferences(conferenceIds);

            var orderedTalks = talks.Where(t => t.Speaker.Contains(speakerName)).OrderByDescending(t => t.DateOfTalk);

            var orderedSummaries = (await CreateTalkSummaries(orderedTalks)).ToArray();
            var user             = users.GetUser(speakerName);
            var slackDmLink      = slackClient.GetDmLink(user.Name, user.SlackId);

            var talksByUser = new TalksByUser(user, orderedSummaries, slackDmLink);

            return(talksByUser);
        }