Base solution for your next web application
Open Closed

Extend PagedResultDto with extra properties #11130


User avatar
0
marble68 created

Prerequisites

v11 MVC Core

In one of my application services - I need to send a value along with the resulting PagedResultDto.

How can I add a property to the PagedResultDto object?

Since the app service inherits from IApplicationService, I can't just change my service's GetAll return type.

How might I approach this, since I need this data not just in the UI but in the dynamically generated API as well?

Thanks for any suggestions


1 Answer(s)
  • User Avatar
    0
    marble68 created

    I wasn't thinking. I created my own object and just returned that, with the same interfaces as the PagedResultDto.

    I think that did the trick