public IList <ModuleViewModel> Get() { var response = _moduleAppService.GetAll(); viewModelList = _mapper.Map <IList <Module>, IList <ModuleViewModel> >(response); return(viewModelList); }
public async Task <IList <ModuleQueryDto> > GetModulesWithElements(EntityRequest input) { var modules = await _moduleAppService.GetAll(); var moduleIds = modules.Select(m => m.Id).ToList(); var moduleElements = await _moduleElementAppService.GetElementByModuleIds(moduleIds); foreach (var item in modules) { item.ModuleElementActionRequests = moduleElements.Where(e => e.ModuleId == item.Id).ToList(); } return(modules); }
public MenuItemDefinition AddMenus() { #region 动态菜单 var modules = _moduleAppService.GetAll(); var project = new MenuItemDefinition( "Business", L("Business"), icon: "menu", order: 5 ); var list = modules.ToList(); FillMenu(project, 0, list); return(project); #endregion }
/// <summary> /// 获取全部 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <List <ModuleQueryDto> > GetAll(EntityRequest input) { return(await _moduleAppService.GetAll()); }