Beispiel #1
0
        public JsonResponse <IEnumerable <JS.Menu.Item> > UpdateSubItems(JS.Menu.SubItemsSaveRequest req)
        {
            return(JsonResponse.Catch(() => {
                var items = TopMenu.GetItemsForParent(null, req.MenuId).ToList();
                UpdateItems(null, req.MenuId, items, req.Items.EmptyIfNull());
                UnitOfWork.Commit();

                return Load(req.MenuId);
            }, Log));
        }
Beispiel #2
0
 public JsonResponse <IEnumerable <JS.Menu.Item> > Load(string menuId)
 {
     return(JsonResponse.Catch(() => TopMenu.GetItemsForParent(null, menuId).Select(TopMenu.ToJson), Log));
 }