/// <summary> /// /// </summary> /// <param name="isSaas"></param> /// <param name="option"></param> /// <returns></returns> private async Task <List <Module> > GetListAsync(ModuleOption option) { var predicate = PredicateBuilder.True <Module>(); if (option != null) { if (!string.IsNullOrEmpty(option.FullName)) { predicate = predicate.And(o => o.FullName.Contains(option.FullName)); } if (option.ParentId.HasValue) { predicate = predicate.And(o => o.ParentId == option.ParentId); } if (option.IsEnabled.HasValue) { predicate = predicate.And(o => o.IsEnabled == option.IsEnabled); } } var t = (await ModuleRep.Find(predicate).ToListAsync()).OrderBy(o => o.SortCode).ToList(); return(t); }
/// <summary> /// 菜单 /// </summary> /// <param name="isSaas"></param> /// <returns></returns> public async Task <List <Module> > GetMenuCatalogListAsync() { return(await ModuleRep.Find(o => o.IsMenu == false).ToListAsync()); }