using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.DataLogic.Repositories; using EMIS.ViewModel.SystemView; using EMIS.ViewModel; namespace EMIS.DataLogic.SystemDAL { public class DictionaryDAL { public DictionaryItemRepository DictionaryItemRepository { get; set; } public IQueryable GetDictionaryItemQuery(DictionaryItem dictionaryCode) { var code = dictionaryCode.ToString(); return GetDictionaryItemQuery(code); } public IQueryable GetDictionaryItemQuery(string dictionaryCode) { var query = DictionaryItemRepository .GetList(w => w.DictionaryCode == dictionaryCode) .Select(s => new DictionaryItemView { DictionaryCode = s.DictionaryCode, Code = s.Code, Name = s.Name, Value = s.Value, OrderNo = s.OrderNo, }); return query; } } }