-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
Update first-web-api.md #34947
Update first-web-api.md #34947
Conversation
For me, putting the id in the body was the only way to get past the check in the method: ``` if (id != todoDTO.Id) { return BadRequest(); } ```
To clarify a bit more, when I was testing, todoDTO.Id is 0 unless it is set |
Oops, this is something that I've missed when porting this to .NET 9. Before: 400 bad request |
So it sounds like this is the correct fix :) I just looked at the walkthrough for minimal APIs and saw the same issue there also, FYI -> @timdeschryver and @wadepickett, is there anything else I need to do? |
Thanks very much @dominiqueplante, looks right. Just give me a moment to test it for versions/vs/vs studio text... |
Perfect, thanks @dominiqueplante! Thanks @timdeschryver for checking as well! |
I should have asked first @dominiqueplante, since you found the issue and the fix is similar, if you wanted the chance to fix the other tutorial (See #34956 ) as well go for it. Otherwise, I can make the fix right away. |
Hi @wadepickett, I'll make the similar change in the other page - thanks for giving me the opportunity to do it :) |
For me, putting the id in the body was the only way to get past the check in the method:
Tracking item added by wadepickett:
Fixes #34954
Internal previews