Skip to content

源生成器生成的请求参数类中,少了父类的字段 #5

Description

@langhaoabcd

在列表分页查询的时候用到了自定义路由用法,但是源生成器生成的代码里面,search接口的query parameter 参数未将父类的参数包含进去,没有PageIndex,PageSize字段。如果不用继承则可以

`
[EndpointSummary("获取用户列表")]
[Route("search")]
public async Task<PagedResult> GetSearchAsync(GetUsersRequest query)
{
return await Task.FromResult(null);
}

public class GetUsersRequest: PagedQuery
{
public string? Name { get; set; }
public string? Sex { get; set; }
}

public class PagedQuery
{
public int PageIndex { get; set; } = 1;
public int PageSize { get; set; } = 100;
}

`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions