Add StatusCode to ActionResult #2109

maxtoroq opened this Issue Mar 3, 2015 · 1 comment


None yet

2 participants

maxtoroq commented Mar 3, 2015

A lot of ActionResults have a StatusCode property. Instead of being duplicated it could be defined in the ActionResult class. This would allow you to write generic code against ActionResult and know the outcome of the action (e.g. success or error), without to having to cast to all the different implementations to find out, if available.

@danroth27 danroth27 added the by design label Mar 4, 2015

We want to keep the action result abstraction free of any specific result logic. You can instead provide a wrapping action result that sets the status code and then calls the inner result.

@danroth27 danroth27 closed this Mar 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment