Exemple #1
0
        public virtual async Task <OrganizationUnit> GetLastChildOrNullAsync(long?parentId)
        {
            var Ou = await _entityManager.GetLastChildOrNullAsync(parentId);

            if (Ou != null)
            {
                return(Ou);
            }
            return(null);
            //var children = await OrganizationUnitRepository.GetAllListAsync(ou => ou.ParentId == parentId);
            //return children.OrderBy(c => c.Code).LastOrDefault();
        }
Exemple #2
0
        public virtual async Task <OrganizationUnitDto> GetLastChildOrNullAsync(Guid?parentId)
        {
            var origanizationUnitLastChildren = await OrganizationUnitManager.GetLastChildOrNullAsync(parentId);

            return(ObjectMapper.Map <OrganizationUnit, OrganizationUnitDto>(origanizationUnitLastChildren));
        }