Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

What's the best way to wrap data in custom format in API controller

$
0
0

I want to wrap all my data in "data" when returning objects(something like http://jsonapi.org/ but not exactly as I don't want all the features), so there's some place for metadata like pagination. Of course there are many ways to do this but I'd like to know your opinion what would be better.

There are 3 possible solutions I can think of:

What do you think is the best way to achieve this?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>