مقادیری که میتوان به عنوان خروجی اکشنهای موجود در ASP.NET Core داشت، عبارتند از:
برای IActionResult میتوانید از موارد زیر بهره ببرید:
- OK (200)
- BadRequest (400)
- Forbid (403)
- LocalRedirect (302)
- LocalRedirectPermanent (301)
- LocalRedirectPermanentPreserve (308)
- LocalRedirectPermanentPreserveMethod (307)
- NoContent (204)
- NotFound (404)
- RedirectToAction (302)
- RedirectToActionPermanent (301)
- RedirectToActionPermanentPreserve (308)
- RedirectToActionPermanentPreserveMethod (307)
- RedirectToPage (302)
- RedirectToPagePermanent (301)
- RedirectToPagePermanentPreserve (308)
- RedirectToPagePermanentPreserveMethod (307)
- RedirectToPage (302)
- RedirectToPagePermanent (301)
- RedirectToPagePermanentPreserve (308)
- RedirectToPagePermanentPreserveMethod (307)
- StatusCode (set own status code)
- Use 409 – Conflict, for updates that fail due to conflicts such as already exists etc..
- Unauthorized (401)
- UnprocessableEntity (422)
- ValidationProblem (400)