public ExternalResourceController( IExternalResourceService externalResourceService, IUnitOfWork unitOfWork) : base(unitOfWork) { this.externalResourceService = externalResourceService; if (GlobalList.ExternalResources.Count() == 0) { GlobalList.ExternalResources = externalResourceService.GetAll(); } }
private void LoadGlobalData() { GlobalList.Topics = topicService.GetAll(); GlobalList.Questions = quesListService.GetAll(); GlobalList.MultipleChoice = multipleChoiceService.GetAll(); GlobalList.ExternalResources = externalResourceService.GetAll(); GlobalList.TutorialTitle = tutorialTitleService.GetAll(); GlobalList.TutorialSubtitle = tutorialsubtitleService.GetAll(); GlobalList.TutorialContent = tutorialContentService.GetAll(); GlobalList.TutorialContent.ToList().ForEach(c => c.DescriptionString = Cmn.GetUnCompressed(c.Description, c.DescriptionLength)); GlobalList.Questions.ToList().ForEach(c => c.AnswerString = Cmn.GetUnCompressed(c.Answer, c.AnswerLength)); }