Exemple #1
0
        public ShareData.ActivatedSubject GetActivatedSubjectBySubjectCode(string subjectCode, string contentLanguage)
        {
            var coltn  = helper.GetCollection <ShareData.ActivatedSubject>(ShareData_ActivatedSubject);
            var result = coltn.Find(x => x.SubjectCode == subjectCode && x.ContentLanguage == contentLanguage).FirstOrDefault();

            return(result);
        }
Exemple #2
0
        public IEnumerable <QuestionSuite> GetAll()
        {
            //var coltn = helper.GetCollection<QuestionSuite>("exambank");
            var coltn  = helper.GetCollection <QuestionSuite>(InactiveSubject_ExamSuite);
            var suites = coltn.Find(Builders <QuestionSuite> .Filter.Empty)
                         .Project(it => new { it.Code, it.SubjectCode, it.SubjectName, it.Description }).ToList();

            return(suites.Select(it => new QuestionSuite
            {
                Code = it.Code,
                SubjectCode = it.SubjectCode,
                SubjectName = it.SubjectName,
                Description = it.Description,
            }).ToList());
        }
Exemple #3
0
        public IEnumerable <InActive.InactiveSubject> ListInActiveSubject(string siteId)
        {
            var coltn  = helper.GetCollection <InActive.InactiveSubject>(InactiveSubject_InactiveSubject);
            var result = coltn.Find(Builders <InActive.InactiveSubject> .Filter.Eq(x => x.SiteId, siteId)).ToList();

            return(result ?? new List <InActive.InactiveSubject>());
        }