Example #1
0
        public async Task <VmPage <VmHierarchy> > GetChildren(int id)
        {
            var result = await _hierarchyService.GetChildren(id);

            return(new VmPage <VmHierarchy>
            {
                Items = VmHierarchy.Build(result),
                PageIndex = 1,
                PageSize = 1,
                TotalCount = result.Count
            });
        }
Example #2
0
        public async Task <VmPage <VmHierarchy> > GetHierarchy(int?depth = null)
        {
            var result = await _hierarchyService.GetAll(depth);

            return(new VmPage <VmHierarchy>
            {
                Items = VmHierarchy.Build(result),
                PageIndex = 1,
                PageSize = 1,
                TotalCount = result.Count
            });
        }