© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
P R Deltoid

ASP.NET API Controller not returning values shown in debugger

I am attempting to return a list of chores when the user queries an endpoint
/Chores?page=1&pageSize=10
/Chores?page=1&pageSize=10
. This endpoint takes the user's claims and pulls a list of that users chores, paginating them as requested. This seems to work fine from the debugger, with the Controller showing 10 chores (a full page) and a total chore count of 26 (see image 1) being returned as a JsonResult. However, the response I receive when querying this endpoint via Swagger UI is an empty object
{}
{}
(image 2), even though the response is 200 and I know the controller function returned valid data.

What could be causing my controller to return a blank value, even when the debugger indicates it is returning valid data?
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ OnSubmit in ASP.NET EditForm is not triggering debugger in VS
C#CC# / help
4y ago
[ASP.NET Controller] No route matches the supplied values
C#CC# / help
4y ago
✅ [SOLVED] Multiple functions in same controller? ASP.NET Core API
C#CC# / help
4y ago