Example #1
0
 private List <TopicOutputDto> GetTopicOutputDto(List <Topic> topicList)
 {
     return(topicList.Select(q => new TopicOutputDto()
     {
         ID = q.ID,
         Name = q.Name,
         DisplayName = q.DisplayName,
         URL = q.URL,
         Description = q.Description,
         Image = Cmn.getTopicImageURL(q.ID),
         InterviewCount = GlobalList.Questions.Where(x => x.Language == q.ID).Count(),
         MultipleChoiceCount = GlobalList.MultipleChoice.Where(x => x.Language == q.ID).Count(),
         TutorialCount = GlobalList.TutorialTitle.Where(x => x.TopicID == q.ID).Count(),
         ExternalResourceCount = GlobalList.ExternalResources.Where(x => x.TopicID == q.ID).Count()
     }).ToList());
 }