private IEnumerable <BuLevelModel> GetBuLevels(int pageNo) { IEnumerable <BuLevelDto> BuLevels = BuLevelService.GetAll(RecordsPerPage, pageNo); IEnumerable <BuLevelModel> BuLevelModels = Mapper.Map <IEnumerable <BuLevelDto>, IEnumerable <BuLevelModel> >(BuLevels); return(BuLevelModels); }
private void LoadDropDownItems() { IEnumerable <BuLevelDto> buLevels = buLevelService.GetAll(); List <SelectListItem> buListItems = (from c in buLevels orderby c.ItemName select new SelectListItem { Text = c.ItemName, Value = c.ItemEntryID.ToString() }).ToList(); ViewBag.BuLevelListItems = buListItems; }