This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add IActionResults factory methods to Page and PageModel #5846
Comments
@ryanbrandenburg adding to your plate. |
3 tasks
Turning your lists into checklists for me to keep track with while getting waylaid by build buddy stuff. Add the following to Page:
Add the following to PageModel:
|
View already exists on |
The |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We have support for returning
IActionResult
from a page or pagemodel, but we haven't yet ported over the API surface that users need.This item tracks adding boilerplate for things we already have, not inventing new action results or factory methods which will be tracked separately.
I've done the gap analysis here between Controller/ControllerBase and Page/Page model:
TLDR here's what to do....
Add the following to Page
Challenge
Content
Forbid
File
LocalRedirect
NotFound
PhysicalFile
Redirect (missing some of the variations for preservemethod)
RedirectToAction
RedirectToRoute
SignIn
SignOut
StatusCode
Unauthorized
Add the following to PageModel
Challenge
Content
Forbid
File
LocalRedirect
NotFound
PhysicalFile
Redirect (missing some of the variations for preservemethod)
RedirectToAction
RedirectToRoute
SignIn
SignOut
StatusCode
Unauthorized
My notes...
All Methods on Controller/ControllerBase
Accepted
AcceptedAtAction
AcceptedAtRoute
BadRequest
Challenge
Content
Created
CreatedAtAction
CreatedAtRoute
File
Forbid
Json
LocalRedirect
NoContent
NotFound
Ok
PartialView
PhysicalFile
Redirect
RedirectToAction
RedirectToRoute
SignIn
SignOut
StatusCode
Unauthorized
View
ViewComponent
All of the Redirect kinds have 4 Permanent/PreserveMethod variations - I'm not going to repeat that detail everywhere 👍
Methods Pages Should Have
Challenge
Content
Forbid
File
LocalRedirect
NotFound
PhysicalFile
Redirect
RedirectToAction
RedirectToRoute
SignIn
SignOut
StatusCode
Unauthorized
Including the authorization-related stuff here because we will eventually add it if we don't today. The things that aren't added are the HTTP/API related helpers, legacy things like JSON and View-related stuff
Methods Pages Don't Need
Accepted
AcceptedAtAction
AcceptedAtRoute
BadRequest
Created
CreatedAtAction
CreatedAtRoute
Json
NoContent
Ok
PartialView
View
ViewComponent
The text was updated successfully, but these errors were encountered: