using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.DataLogic.Repositories; using EMIS.ViewModel; using EMIS.ViewModel.ScoreManage; namespace EMIS.DataLogic.ScoreManage { public class ExamsCategorySettingDAL { public DictionaryItemRepository DictionaryItemRepository { get; set; } public ExamsCategorySettingRepository ExamsCategorySettingRepository { get; set; } public IQueryable GetExamsCategorySettingView() { var sql = (from category in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_ExamsCategory).Name && x.RecordStatus > (int)SYS_STATUS.UNUSABLE) join setting in ExamsCategorySettingRepository.Entities on category.Value equals setting.ExamsCategoryID into dsetting from setting in dsetting.DefaultIfEmpty() select new ExamsCategorySettingView { ExamsCategoryID = category.Value, ExamsCategorySettingID = setting.ExamsCategorySettingID, IsReadHistory = setting.IsReadHistory ?? false }); return sql; } } }