Closed VictorioBerra closed 5 years ago
Thanks for contacting us, @VictorioBerra.
The behavior you're seeing here is by-design. If you wish your action to return something relatively generic, you can use the Task<ActionResult>
as a return type. Otherwise, if you know the exact type you're going to return, Task<ActionResult<T>>
is a great option to stick with.
Is this a Bug or Feature request?:
Bug
Steps to reproduce (preferably a link to a GitHub repo with a repro project):
Description of the problem:
GetNumber()
returnsNotFound()
. If you callTask DeleteAsyncNotWorking
with something like Postman you will see 200OK. This is really confusing... I have to go to all of my methods now and make sure they return the correct codes.Version of
Microsoft.AspNetCore.Mvc
orMicrosoft.AspNetCore.App
orMicrosoft.AspNetCore.All
:2.2.0