增加菜单排序,先按照Category然后是Order

This commit is contained in:
Argo-Lenovo 2016-12-20 16:28:31 +08:00
parent b54bc19e81
commit 1edf470bae
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ namespace Bootstrap.DataAccess
public static IEnumerable<Menu> RetrieveAllMenusByUserName(string userName)
{
var navs = RetrieveMenus(userName);
var root = navs.Where(m => m.ParentId == 0).OrderBy(m => m.Order);
var root = navs.Where(m => m.ParentId == 0).OrderBy(m => m.Category).ThenBy(m => m.Order);
CascadeMenu(navs, root);
return root;
}