We can use [FromQuery(Name"param")] in a controller action to specify how the passed parameter will be used in the uri as in :
[HttpGet()]
public IActionResult GetPeople([FromQuery(Name="page")] int pageNumber, [FromQuery(Name="size")] int pageSize)
{
//Do things
}
How to use that in the case of using a complex type such as PeoplePaginationParameters where :
public class PaginationParameters
{
public int PageNumber { get; set;}
public int PageSize { get; set;}
}
Is there any thing like :
[HttpGet()]
public IActionResult GetPeople([FromQuery(Name="page", Name="size")] PaginationParameters paginationParameters)
{
//Do things
}