abpframework / abpframework/abp

Support list/enumrable of complex types for ABP dynamic/static c# proxies on GET requests

Open
#23,575 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

abp-framework feature
Dominant language
C#
Stars
14.4k
Forks
3.7k
Avg merge
15h 32m
Merged PRs (30d)
106

Description

Currently, it can not properly convert these kind of objects to query string parameters. Example method parameter:


// APP SERVICE METHOD:

public async Task<PagedResultDto<Dictionary<string, object?>>> GetListAsync(DynamicEntityListRequestDto input)

// METHOD PARAM

public class DynamicEntityListRequestDto : PagedResultRequestDto
{
    public string EntityName { get; set; }
    
    public List<DynamicQuerySortArgs>? Sortings { get; set; }
}

public class DynamicQuerySortArgs
{
    public string PropertyName { get; set; }
    public bool IsDescending { get; set; }
}

Now the request is made like that:

https://localhost:44337/api/app/dynamic-entity?
EntityName=LowCodeDemo.Customers.Customer&
Sortings[0]=LowCodeDemo.LowCode.DynamicQuerySortArgs&
SkipCount=0&MaxResultCount=10&api-version=1.0

So, it makes ToString() for the LowCodeDemo.LowCode.DynamicQuerySortArgs object, but it should send its values properly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the dynamic/static C# proxy GET request with the shown DynamicEntityListRequestDto and inspect how its query string is generated. Trace the GET-request serialization entry point for list or enumerable complex types; done means Sortings includes each object's property values instead of its ToString() result.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.