Ejemplo n.º 1
0
        public virtual async Task <PagedResultDto <IdentityRoleDto> > GetUnaddedRolesAsync(Guid id, OrganizationUnitGetUnaddedRoleByPagedDto input)
        {
            var origanizationUnit = await OrganizationUnitRepository.GetAsync(id);

            var origanizationUnitRoleCount = await OrganizationUnitRepository
                                             .GetUnaddedRolesCountAsync(origanizationUnit, input.Filter);

            var origanizationUnitRoles = await OrganizationUnitRepository
                                         .GetUnaddedRolesAsync(origanizationUnit,
                                                               input.Sorting, input.MaxResultCount,
                                                               input.SkipCount, input.Filter);

            return(new PagedResultDto <IdentityRoleDto>(origanizationUnitRoleCount,
                                                        ObjectMapper.Map <List <IdentityRole>, List <IdentityRoleDto> >(origanizationUnitRoles)));
        }