Exemplo n.º 1
0
        public virtual async Task <PagedResultDto <TenantDto> > GetListAsync(GetTenantsInput input)
        {
            var count = await TenantRepository.GetCountAsync(input.Filter);

            var list = await TenantRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter);

            return(new PagedResultDto <TenantDto>(
                       count,
                       ObjectMapper.Map <List <Tenant>, List <TenantDto> >(list)
                       ));
        }
Exemplo n.º 2
0
        public virtual async Task<PagedResultDto<TenantDto>> GetListAsync(GetTenantsInput input)
        {
            if (input.Sorting.IsNullOrWhiteSpace())
            {
                input.Sorting = nameof(Tenant.Name);
            }

            var count = await TenantRepository.GetCountAsync(input.Filter);
            var list = await TenantRepository.GetListAsync(
                input.Sorting,
                input.MaxResultCount,
                input.SkipCount,
                input.Filter
            );

            return new PagedResultDto<TenantDto>(
                count,
                ObjectMapper.Map<List<Tenant>, List<TenantDto>>(list)
            );
        }
Exemplo n.º 3
0
 public virtual Task <PagedResultDto <TenantDto> > GetListAsync(GetTenantsInput input)
 {
     return(TenantAppService.GetListAsync(input));
 }