using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.MinorManage.MinorSetting; using System.Linq.Expressions; using EMIS.Entities; using EMIS.DataLogic.Repositories; using EMIS.ViewModel; namespace EMIS.DataLogic.MinorManage.MinorSetting { public class MinorStandardSettingDAL { public MinorStandardSettingRepository minorStandardSettingRepository { get; set; } public DictionaryItemRepository dictionaryItemRepository { get; set; } public IQueryable GetMinorStandardSettingViewQueryable(Expression> exp) { var query = from mssr in minorStandardSettingRepository.GetList(exp) select new MinorStandardSettingView { MinorStandardSettingID = mssr.MinorStandardSettingID, MinorStandardID = mssr.MinorStandardID, StandardID = mssr.StandardID, }; return query; } public IQueryable GetStandardNotHaveSelect(Expression> exp) { var query = from dir in dictionaryItemRepository.GetList(exp) select new MinorStandardSettingView { MinorStandardCode = dir.Code, //Name = dir.Name, MinorStandardID = dir.Value, }; return query.OrderBy(x => x.MinorStandardID); } } }