-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Add IResult implementations for more IActionResults #32565
Comments
@pranavkm should we bother with ActionResult<T>? |
We'll strike out the action results that don't make sense once we investigate their feasibility |
For anyone looking at this because of the |
Thanks for contacting us. We're moving this issue to the |
Sounds interesting, I will take the easiest ones 😄 |
I would like to try ContentResult or something simple. |
@halter73 @davidfowl I would like to confirm the approach I am taking is how you were envisioning the implementation of these new If the approach its fine I will continue with the rest but there is a question, similar to MVC we will need to register singleton of each ActionResult like this aspnetcore/src/Mvc/Mvc.Core/src/DependencyInjection/MvcCoreServiceCollectionExtensions.cs Lines 245 to 259 in d8906c8
Where do you think is the best place to add these new addings in this particular case? |
@halter73 @davidfowl can I try the |
That's the hard one. Maybe the file results? |
Why not 🙂. I'll submit PR on that. |
@pranavkm suggested that we should support |
I'm implementing the |
I think that's a good idea @ilkayilknur |
@ilkayilknur I think the plan is to not add any more |
Thanks for the update @pranavkm |
The remaining work was addressed by #33843 |
Currently, only JsonResult and StatusCodeResult implement both an IActionResult and IResult. This means there are a bunch of remaining built-in
IActionResult
s implementations that have no IResult equivalent.ObjectResult
is the bigIActionResult
that probably doesn't have an easyIResult
implementation. I feel this requires some support for content-negotiation, but maybe we can just assume JSON.The text was updated successfully, but these errors were encountered: