Exemple #1
0
        public async Task <List <SmHierarchy> > GetAll(int?depth = null)
        {
            List <Hierarchy> entities;

            if (depth == null)
            {
                entities = await _productRepository.GetAll();
            }
            else
            {
                entities = await _productRepository.GetByDepth((int)depth);
            }

            return(SmHierarchy.Build(entities));
        }