public static List <MenuSub> getMenuSubByController(string ctr) { //busca no banco MenuSubRepository tprep = new MenuSubRepository(); var lst = tprep.Search(x => x.controller == ctr).ToList(); var result = lst.OrderBy(y => y.ordem).ToList(); return(result); }
public static List <MenuSub> getMenuSubByMenuId(Int16 id) { //busca no banco MenuSubRepository tprep = new MenuSubRepository(); var lst = tprep.Search(x => x.menuid == id).ToList(); var result = lst.OrderBy(y => y.ordem).ToList(); return(result); }