Exemple #1
0
    /// <summary>
    /// 获取租户列表
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public virtual async Task <PagedResult <TenantDto> > GetListAsync(TenantRequest input)
    {
        if (input.Sorting.IsNullOrWhiteSpace())
        {
            input.Sorting = nameof(Tenant.Name);
        }

        var count = await TenantRepository.GetCountAsync(input.Filter);

        var items = await TenantRepository.GetPagedListAsync(input.Page, input.PageSize, input.Sorting);

        return(new PagedResult <TenantDto>(count, items.MapTo <List <TenantDto> >()));
    }