public IEnumerable <Screen> GetScreens() { if (!_cache.CheckInCache(AllScreens)) { Func <IEnumerable <Screen> > scr = () => _screenRepository.GetScreens(); _cache.SetInCache(AllScreens, scr); _logger.LogInformation("Set screens in cache"); } return(_cache.ReturnValueByKey(AllScreens)); }
//public List<SelectListItem> GetScreenTypeList() //{ // return new List<SelectListItem> // { // new SelectListItem // { // Text = "Screen", // Value = "S" // }, // new SelectListItem // { // Text = "Report", // Value = "R" // } // }; //} public List <ScreenModel> GetScreenList(long?id, long?moduleId) { var screenList = _screenRepository.GetScreens(id, moduleId); return(Mapper.Map <List <ScreenModel> >(screenList)); }