Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webapi only return 1 record #1795

Closed
juchunwei opened this issue Oct 24, 2016 · 4 comments
Closed

webapi only return 1 record #1795

juchunwei opened this issue Oct 24, 2016 · 4 comments

Comments

@juchunwei
Copy link

I don't know what's wrong. I did the http get method:

var chks = _context.CheckListForUsers.Include(c => c.CheckList).ToList();
return chks.

I can see there're 3 records, but only shows 1 if I open it with browser or on my client app.

but if I remove Include(c => c.CheckList), I can get 3 records.

what's wrong?

Thanks,

@Tratcher
Copy link
Member

If you turn on logging to you see any exceptions logged? This issue may be related: aspnet/Mvc#5413

@juchunwei
Copy link
Author

@Tratcher, thanks, but could you tell me how to turn on logging?

@Tratcher
Copy link
Member

Add the console logger: https://docs.asp.net/en/latest/fundamentals/logging.html

Also, if you're using IIS/Express you'll need to enable stdoutLogEnabled in the web.config.
https://docs.asp.net/en/latest/hosting/aspnet-core-module.html

@juchunwei
Copy link
Author

@Tratcher , thank you so much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants