ControllerBase 類別

定義

MVC 控制器的基類,不支援檢視。

public ref class ControllerBase abstract
[Microsoft.AspNetCore.Mvc.Controller]
public abstract class ControllerBase
[<Microsoft.AspNetCore.Mvc.Controller>]
type ControllerBase = class
Public MustInherit Class ControllerBase
繼承
ControllerBase
衍生
屬性

建構函式

ControllerBase()

MVC 控制器的基類,不支援檢視。

屬性

ControllerContext

取得或設定 ControllerContext

Empty

取得 的 EmptyResult 實例。

HttpContext

HttpContext取得執行動作的 。

MetadataProvider

取得或設定 IModelMetadataProvider

ModelBinderFactory

取得或設定 IModelBinderFactory

ModelState

ModelStateDictionary取得 ,其中包含模型和模型系結驗證的狀態。

ObjectValidator

取得或設定 IObjectModelValidator

ProblemDetailsFactory

取得或設定 ProblemDetailsFactory

Request

HttpRequest取得執行動作的 。

Response

HttpResponse取得執行動作的 。

RouteData

RouteData取得執行動作的 。

Url

取得或設定 IUrlHelper

User

取得與 ClaimsPrincipal 執行動作相關聯的使用者。

方法

Accepted()

建立產生 AcceptedResultStatus202Accepted 回應的 物件。

Accepted(Object)

建立產生 AcceptedResultStatus202Accepted 回應的 物件。

Accepted(String)

建立產生 AcceptedResultStatus202Accepted 回應的 物件。

Accepted(String, Object)

建立產生 AcceptedResultStatus202Accepted 回應的 物件。

Accepted(Uri)

建立產生 AcceptedResultStatus202Accepted 回應的 物件。

Accepted(Uri, Object)

建立產生 AcceptedResultStatus202Accepted 回應的 物件。

AcceptedAtAction(String)

建立產生 AcceptedAtActionResultStatus202Accepted 回應的 物件。

AcceptedAtAction(String, Object)

建立產生 AcceptedAtActionResultStatus202Accepted 回應的 物件。

AcceptedAtAction(String, Object, Object)

建立產生 AcceptedAtActionResultStatus202Accepted 回應的 物件。

AcceptedAtAction(String, String)

建立產生 AcceptedAtActionResultStatus202Accepted 回應的 物件。

AcceptedAtAction(String, String, Object)

建立產生 AcceptedAtActionResultStatus202Accepted 回應的 物件。

AcceptedAtAction(String, String, Object, Object)

建立產生 AcceptedAtActionResultStatus202Accepted 回應的 物件。

AcceptedAtRoute(Object)

建立產生 AcceptedAtRouteResultStatus202Accepted 回應的 物件。

AcceptedAtRoute(Object, Object)

建立產生 AcceptedAtRouteResultStatus202Accepted 回應的 物件。

AcceptedAtRoute(String)

建立產生 AcceptedAtRouteResultStatus202Accepted 回應的 物件。

AcceptedAtRoute(String, Object)

建立產生 AcceptedAtRouteResultStatus202Accepted 回應的 物件。

AcceptedAtRoute(String, Object, Object)

建立產生 AcceptedAtRouteResultStatus202Accepted 回應的 物件。

BadRequest()

BadRequestResult建立會產生回應的 Status400BadRequest

BadRequest(ModelStateDictionary)

BadRequestObjectResult建立會產生回應的 Status400BadRequest

BadRequest(Object)

BadRequestObjectResult建立會產生回應的 Status400BadRequest

Challenge()

建立 ChallengeResult

Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties 建立 。

Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties 建立 。

Challenge(AuthenticationProperties, String[])

ChallengeResult使用指定的驗證配置和 properties 建立 。

Challenge(AuthenticationProperties, String[])

ChallengeResult使用指定的驗證配置和 properties 建立 。

Challenge(String[])

ChallengeResult使用指定的驗證配置建立 。

Conflict()

ConflictResult建立會產生回應的 Status409Conflict

Conflict(ModelStateDictionary)

ConflictObjectResult建立會產生回應的 Status409Conflict

Conflict(Object)

ConflictObjectResult建立會產生回應的 Status409Conflict

Content(String)

藉由指定字串來 ContentResult 建立 content 物件。

Content(String, MediaTypeHeaderValue)

ContentResult藉由指定字串和 contentType 來建立 content 物件。

Content(String, String)

ContentResult藉由指定字串和內容類型來 content 建立 物件。

Content(String, String, Encoding)

藉由指定字串、、 contentTypecontentEncoding 來建立 ContentResultcontent 物件。

Created()

建立產生 CreatedResultStatus201Created 回應的 物件。

Created(String, Object)

建立產生 CreatedResultStatus201Created 回應的 物件。

Created(Uri, Object)

建立產生 CreatedResultStatus201Created 回應的 物件。

CreatedAtAction(String, Object)

建立產生 CreatedAtActionResultStatus201Created 回應的 物件。

CreatedAtAction(String, Object, Object)

建立產生 CreatedAtActionResultStatus201Created 回應的 物件。

CreatedAtAction(String, String, Object, Object)

建立產生 CreatedAtActionResultStatus201Created 回應的 物件。

CreatedAtRoute(Object, Object)

建立產生 CreatedAtRouteResultStatus201Created 回應的 物件。

CreatedAtRoute(String, Object)

建立產生 CreatedAtRouteResultStatus201Created 回應的 物件。

CreatedAtRoute(String, Object, Object)

建立產生 CreatedAtRouteResultStatus201Created 回應的 物件。

File(Byte[], String)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Byte[], String, Boolean)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Byte[], String, String)

傳回指定 fileContents 為內容 (Status200OK) 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Byte[], String, String, Boolean)

傳回指定 fileContents 為內容 (Status200OK) 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileContents 為內容 (Status200OK) 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileContents 為內容 (Status200OK) 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String)

傳回指定 fileStream 之 (Status200OK) 中的檔案,並將 指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String, Boolean)

傳回指定 fileStream 之 (Status200OK) 中的檔案,並將 指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileStream () Status200OK 中的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileStream () Status200OK 中的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String, String)

傳回指定 fileStream () Status200OKcontentType 中指定為 Content-Type 的檔案,並將指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String, String, Boolean)

傳回指定 fileStream () Status200OKcontentType 中指定為 Content-Type 的檔案,並將指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileStream () Status200OK 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileStream () Status200OK 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String)

傳回指定為 Content-Type 的 (Status200OK) 所 virtualPath 指定的 contentType 檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String, Boolean)

傳回指定為 Content-Type 的 (Status200OK) 所 virtualPath 指定的 contentType 檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回 () Status200OKvirtualPath 指定的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回 () Status200OKvirtualPath 指定的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String, String)

virtualPath傳回 (指定的檔案 Status200OK ,) 指定 contentType 為 Content-Type,並將 指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String, String, Boolean)

virtualPath傳回 (指定的檔案 Status200OK ,) 指定 contentType 為 Content-Type,並將 指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

virtualPath傳回 (指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

virtualPath傳回 (指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

Forbid()

預設會建立 ForbidResult (Status403Forbidden) 。

Forbid(AuthenticationProperties)

ForbidResultStatus403Forbidden 根據預設,使用指定的 properties 建立 () 。

Forbid(AuthenticationProperties)

ForbidResult使用指定的 properties 建立 。

Forbid(AuthenticationProperties, String[])

根據預設, ForbidResultStatus403Forbidden 使用指定的驗證配置和 properties 建立 () 。

Forbid(AuthenticationProperties, String[])

ForbidResult使用指定的驗證配置和 properties 建立 。

Forbid(String[])

ForbidResultStatus403Forbidden 根據預設,使用指定的驗證配置建立 () 。

LocalRedirect(String)

LocalRedirectResult建立 物件,將 (Status302Found) 重新導向至指定的本機 localUrl

LocalRedirectPermanent(String)

LocalRedirectResult使用指定的 localUrl 建立物件 Permanent ,並將 Status301MovedPermanently 設定為 true () 。

LocalRedirectPermanentPreserveMethod(String)

LocalRedirectResult使用指定的 localUrl 建立 物件, Permanent 並將 設定為 true,並將 PreserveMethod 設定為 true (Status308PermanentRedirect) 。

LocalRedirectPreserveMethod(String)

LocalRedirectResult使用指定的 localUrl 建立物件, Permanent 並將 設為 false,並將 PreserveMethod 設定為 true (Status307TemporaryRedirect) 。

NoContent()

建立物件 NoContentResult ,以產生空 Status204NoContent 的回應。

NotFound()

NotFoundResult建立會產生回應的 Status404NotFound

NotFound(Object)

NotFoundObjectResult建立會產生回應的 Status404NotFound

Ok()

建立物件 OkResult ,以產生空 Status200OK 的回應。

Ok(Object)

OkObjectResult建立產生 Status200OK 回應的物件。

PhysicalFile(String, String)

傳回指定為 Content-Type 的 (Status200OK) 所 physicalPath 指定的 contentType 檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

PhysicalFile(String, String, Boolean)

傳回指定為 Content-Type 的 (Status200OK) 所 physicalPath 指定的 contentType 檔案。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回 () Status200OKphysicalPath 指定的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回 () Status200OKphysicalPath 指定的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

PhysicalFile(String, String, String)

physicalPath傳回 (指定的檔案 Status200OK ,) 指定 contentType 為 Content-Type,並將 指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

PhysicalFile(String, String, String, Boolean)

physicalPath傳回 (指定的檔案 Status200OK ,) 指定 contentType 為 Content-Type,並將 指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

physicalPath傳回 (指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

physicalPath傳回 (指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或者 Status416RangeNotSatisfiable 範圍無法滿足) 。

Problem(String, String, Nullable<Int32>, String, String)

ObjectResult建立會產生回應的 ProblemDetails

Redirect(String)

建立 RedirectResult 物件,將 Status302Found () 重新導向至指定的 url

RedirectPermanent(String)

RedirectResult使用指定的 url 建立物件 Permanent ,並將 Status301MovedPermanently 設定為 true () 。

RedirectPermanentPreserveMethod(String)

RedirectResult使用指定的 url 建立 物件, Permanent 並將 設定為 true,並將 PreserveMethod 設定為 true (Status308PermanentRedirect) 。

RedirectPreserveMethod(String)

RedirectResult使用指定的 url 建立物件, Permanent 並將 設為 false,並將 PreserveMethod 設定為 true (Status307TemporaryRedirect) 。

RedirectToAction()

將 (Status302Found) 重新導向至與目前相同名稱的動作。 從目前要求的環境值擷取 'controller' 和 'action' 名稱。

RedirectToAction(String)

使用 actionName 將 () Status302Found 重新導向至指定的動作。

RedirectToAction(String, Object)

使用 actionNamerouteValues 將 (Status302Found) 重新導向至指定的動作。

RedirectToAction(String, String)

使用 actionNamecontrollerName 將 (Status302Found) 重新導向至指定的動作。

RedirectToAction(String, String, Object)

使用指定的 、 controllerNamerouteValues ,將 (Status302Found) 重新導向至指定的 actionName 動作。

RedirectToAction(String, String, Object, String)

使用指定的 、、 和 ,將 (Status302Found) 重新導向至指定的 actionName 動作。 fragmentrouteValuescontrollerName

RedirectToAction(String, String, String)

使用指定的 、 controllerNamefragment ,將 (Status302Found) 重新導向至指定的 actionName 動作。

RedirectToActionPermanent(String)

使用指定的 ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

RedirectToActionPermanent(String, Object)

使用指定的 和 routeValues ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

RedirectToActionPermanent(String, String)

使用指定的 和 controllerName ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

RedirectToActionPermanent(String, String, Object)

使用指定的 、 controllerNamerouteValues ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

RedirectToActionPermanent(String, String, Object, String)

使用指定的 、、 和 ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 PermanentfragmentrouteValuescontrollerName

RedirectToActionPermanent(String, String, String)

使用指定的 、 controllerNamefragment ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

RedirectToActionPermanentPreserveMethod(String, String, Object, String)

使用指定的 、、 和 ,將 (Status308PermanentRedirect) 重新導向至指定的動作 Permanent ,並將 設定為 true 並 PreserveMethod 設定為 true。 fragmentrouteValuescontrollerNameactionName

RedirectToActionPreserveMethod(String, String, Object, String)

使用指定的 、、 和 ,將 (Status307TemporaryRedirect) 重新導向至指定的動作,並將 Permanent 設定為 false 並 PreserveMethod 設定為 true。 fragmentrouteValuescontrollerNameactionName

RedirectToPage(String)

將 (Status302Found) 重新導向至指定的 pageName

RedirectToPage(String, Object)

使用指定的 ,將 Status302Found () 重新導向至指定的 pageNamerouteValues

RedirectToPage(String, String)

使用指定的 ,將 Status302Found () 重新導向至指定的 pageNamepageHandler

RedirectToPage(String, String, Object)

將 (Status302Found) 重新導向至指定的 pageName

RedirectToPage(String, String, Object, String)

使用指定的 和 ,將 (Status302Found) 重新導向至指定的 pageNamerouteValuesfragment

RedirectToPage(String, String, String)

使用指定的 ,將 Status302Found () 重新導向至指定的 pageNamefragment

RedirectToPagePermanent(String)

將 (Status301MovedPermanently) 重新導向至指定的 pageName

RedirectToPagePermanent(String, Object)

使用指定的 ,將 Status301MovedPermanently () 重新導向至指定的 pageNamerouteValues

RedirectToPagePermanent(String, String)

使用指定的 ,將 Status301MovedPermanently () 重新導向至指定的 pageNamepageHandler

RedirectToPagePermanent(String, String, Object, String)

使用指定的 和 ,將 (Status301MovedPermanently) 重新導向至指定的 pageNamerouteValuesfragment

RedirectToPagePermanent(String, String, String)

使用指定的 ,將 Status301MovedPermanently () 重新導向至指定的 pageNamefragment

RedirectToPagePermanentPreserveMethod(String, String, Object, String)

使用指定的 、 和 ,將 Status308PermanentRedirect () 重新導向至指定的路由,並將 Permanent 設定為 true 並 PreserveMethod 設定為 true。 fragmentrouteValuespageName

RedirectToPagePreserveMethod(String, String, Object, String)

使用指定的 、 和 ,將 (Status307TemporaryRedirect) 重新導向至指定的頁面 Permanent ,並將 設定為 false 並 PreserveMethod 設定為 true。 fragmentrouteValuespageName

RedirectToRoute(Object)

使用指定的 ,將 Status302Found () 重新導向至指定的 routeValues 路由。

RedirectToRoute(String)

使用指定的 ,將 Status302Found () 重新導向至指定的 routeName 路由。

RedirectToRoute(String, Object)

使用指定的 和 routeValues ,將 (Status302Found) 重新導向至指定的 routeName 路由。

RedirectToRoute(String, Object, String)

使用指定的 、 routeValuesfragment ,將 (Status302Found) 重新導向至指定的 routeName 路由。

RedirectToRoute(String, String)

使用指定的 和 fragment ,將 (Status302Found) 重新導向至指定的 routeName 路由。

RedirectToRoutePermanent(Object)

使用指定的 routeValues ,將 (Status301MovedPermanently) 重新導向至指定的路由,並將 Permanent 設定為 true。

RedirectToRoutePermanent(String)

使用指定的 routeName ,將 (Status301MovedPermanently) 重新導向至指定的路由,並將 Permanent 設定為 true。

RedirectToRoutePermanent(String, Object)

使用指定的 routeNamerouteValues ,將 (Status301MovedPermanently) 重新導向至指定的路由,並將 Permanent 設定為 true。

RedirectToRoutePermanent(String, Object, String)

使用指定的 、 routeValuesfragment ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 routeName 路由 Permanent

RedirectToRoutePermanent(String, String)

使用指定的 routeNamefragment ,將 (Status301MovedPermanently) 重新導向至指定的路由,並將 Permanent 設定為 true。

RedirectToRoutePermanentPreserveMethod(String, Object, String)

使用指定的 、 和 ,將 Status308PermanentRedirect () 重新導向至指定的路由,並將 Permanent 設定為 true 並 PreserveMethod 設定為 true。 fragmentrouteValuesrouteName

RedirectToRoutePreserveMethod(String, Object, String)

使用指定的 、 和 ,將 (Status307TemporaryRedirect) 重新導向至指定的路由,並將 Permanent 設定為 false 並 PreserveMethod 設定為 true。 fragmentrouteValuesrouteName

SignIn(ClaimsPrincipal)

建立 SignInResult

SignIn(ClaimsPrincipal, AuthenticationProperties)

SignInResult使用 properties 建立 。

SignIn(ClaimsPrincipal, AuthenticationProperties, String)

SignInResult使用指定的驗證配置和 properties 建立 。

SignIn(ClaimsPrincipal, AuthenticationProperties, String)

SignInResult使用指定的驗證配置和 properties 建立 。

SignIn(ClaimsPrincipal, String)

SignInResult使用指定的驗證配置建立 。

SignOut()

建立 SignOutResult

SignOut(AuthenticationProperties)

SignOutResult使用 properties 建立 。

SignOut(AuthenticationProperties, String[])

SignOutResult使用指定的驗證配置和 properties 建立 。

SignOut(AuthenticationProperties, String[])

SignOutResult使用指定的驗證配置和 properties 建立 。

SignOut(String[])

SignOutResult使用指定的驗證配置建立 。

StatusCode(Int32)

藉由指定 statusCode 來建立 StatusCodeResult 物件。

StatusCode(Int32, Object)

藉由指定 statusCode 和 來建立 ObjectResult 物件value

TryUpdateModelAsync(Object, Type, String)

使用來自控制器目前 IValueProviderprefix 的值,更新指定的 model 實例。

TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 valueProviderprefix 更新指定的 model 實例。

TryUpdateModelAsync<TModel>(TModel)

使用來自控制器目前 IValueProvider 的值,更新指定的 model 實例。

TryUpdateModelAsync<TModel>(TModel, String)

使用來自控制器目前 IValueProviderprefix 的值,更新指定的 model 實例。

TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[])

使用控制器目前 IValueProviderprefix 中的值,更新指定的 model 實例。

TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>)

使用控制器目前 IValueProviderprefix 中的值,更新指定的 model 實例。

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

使用 valueProviderprefix 更新指定的 model 實例。

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[])

使用 和 prefix 更新指定的 model 實例 valueProvider

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 和 prefix 更新指定的 model 實例 valueProvider

TryValidateModel(Object)

驗證指定的 model 實例。

TryValidateModel(Object, String)

驗證指定的 model 實例。

Unauthorized()

UnauthorizedResult建立產生回應的 Status401Unauthorized

Unauthorized(Object)

UnauthorizedObjectResult建立產生回應的 Status401Unauthorized

UnprocessableEntity()

UnprocessableEntityResult建立產生回應的 Status422UnprocessableEntity

UnprocessableEntity(ModelStateDictionary)

UnprocessableEntityObjectResult建立產生回應的 Status422UnprocessableEntity

UnprocessableEntity(Object)

UnprocessableEntityObjectResult建立產生回應的 Status422UnprocessableEntity

ValidationProblem()

建立 , ActionResult 其會產生 Status400BadRequest 來自 驗證錯誤的 ModelState 回應。

ValidationProblem(ModelStateDictionary)

建立 , ActionResult 其會產生 Status400BadRequest 來自 驗證錯誤的 modelStateDictionary 回應。

ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary)

建立 , ActionResult 產生 Status400BadRequest 具有 ValidationProblemDetails 值的回應。

ValidationProblem(ValidationProblemDetails)

BadRequestObjectResult建立產生回應的 Status400BadRequest

適用於