Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Unable to change MaxResultCount for single API #6386


User avatar
0
ajayak created

I have class:

class GetInventoryListInput : PagedAndSortedInputDto

I tried to override MaxResultCount property in constructor and also as new MaxResultCount. In this case, I always get 10 result.

I tried with [DisableValidation] but still get the error:

The field MaxResultCount must be between 1 and 1000.

How can I override MaxResultCount for 1 single call?


4 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    How are you calling the API?

  • User Avatar
    0
    ajayak created

    I'm using Angular frontend.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ajayak

    Are you sending the value for MaxResultCount (a value bigger than 1000) from client app ? If so, I suggest you to use a different Dto for this special case.

    This field is marked with [Range(1, AppConsts.MaxPageSize)], so you can't override it for a single call.

  • User Avatar
    0
    ajayak created

    @ismcagdas, I'm sending 1100 from client app. I guess that would be the last option then :)