abpframework / abpframework/abp
Support list/enumrable of complex types for ABP dynamic/static c# proxies on GET requests
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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