Controller 类

定义

具有视图支持的 MVC 控制器的基类。

public ref class Controller abstract : Microsoft::AspNetCore::Mvc::ControllerBase, IDisposable, Microsoft::AspNetCore::Mvc::Filters::IActionFilter, Microsoft::AspNetCore::Mvc::Filters::IAsyncActionFilter
public abstract class Controller : Microsoft.AspNetCore.Mvc.ControllerBase, IDisposable, Microsoft.AspNetCore.Mvc.Filters.IActionFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter
type Controller = class
    inherit ControllerBase
    interface IActionFilter
    interface IFilterMetadata
    interface IAsyncActionFilter
    interface IDisposable
Public MustInherit Class Controller
Inherits ControllerBase
Implements IActionFilter, IAsyncActionFilter, IDisposable
继承
Controller
实现

构造函数

Controller()

具有视图支持的 MVC 控制器的基类。

属性

ControllerContext

获取或设置 ControllerContext

(继承自 ControllerBase)
HttpContext

HttpContext获取执行操作的 。

(继承自 ControllerBase)
MetadataProvider

获取或设置 IModelMetadataProvider

(继承自 ControllerBase)
ModelBinderFactory

获取或设置 IModelBinderFactory

(继承自 ControllerBase)
ModelState

ModelStateDictionary获取包含模型状态和模型绑定验证状态的 。

(继承自 ControllerBase)
ObjectValidator

获取或设置 IObjectModelValidator

(继承自 ControllerBase)
ProblemDetailsFactory

获取或设置 ProblemDetailsFactory

(继承自 ControllerBase)
Request

HttpRequest获取执行操作的 。

(继承自 ControllerBase)
Response

HttpResponse获取执行操作的 。

(继承自 ControllerBase)
RouteData

RouteData获取执行操作的 。

(继承自 ControllerBase)
TempData

获取或设置 ITempDataDictionary 使用的 ViewResult

Url

获取或设置 IUrlHelper

(继承自 ControllerBase)
User

ClaimsPrincipal获取与执行操作关联的用户的 。

(继承自 ControllerBase)
ViewBag

获取动态视图包。

ViewData

获取或设置 ViewDataDictionaryViewResultViewBag使用的 。

方法

Accepted()

创建生成 AcceptedResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
Accepted(Object)

创建生成 AcceptedResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
Accepted(String)

创建生成 AcceptedResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
Accepted(String, Object)

创建生成 AcceptedResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
Accepted(Uri)

创建生成 AcceptedResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
Accepted(Uri, Object)

创建生成 AcceptedResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtAction(String)

创建生成 AcceptedAtActionResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtAction(String, Object)

创建生成 AcceptedAtActionResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtAction(String, Object, Object)

创建生成 AcceptedAtActionResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtAction(String, String)

创建生成 AcceptedAtActionResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtAction(String, String, Object)

创建生成 AcceptedAtActionResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtAction(String, String, Object, Object)

创建生成 AcceptedAtActionResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtRoute(Object)

创建生成 AcceptedAtRouteResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtRoute(Object, Object)

创建生成 AcceptedAtRouteResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtRoute(String)

创建生成 AcceptedAtRouteResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtRoute(String, Object)

创建生成 AcceptedAtRouteResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
AcceptedAtRoute(String, Object, Object)

创建生成 AcceptedAtRouteResult 响应的 Status202Accepted 对象。

(继承自 ControllerBase)
BadRequest()

BadRequestResult创建生成响应的 Status400BadRequest

(继承自 ControllerBase)
BadRequest(ModelStateDictionary)

BadRequestObjectResult创建生成响应的 Status400BadRequest

(继承自 ControllerBase)
BadRequest(Object)

BadRequestObjectResult创建生成响应的 Status400BadRequest

(继承自 ControllerBase)
Challenge()

创建一个 ChallengeResult

(继承自 ControllerBase)
Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties创建 。

(继承自 ControllerBase)
Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties创建 。

(继承自 ControllerBase)
Challenge(AuthenticationProperties, String[])

使用指定的身份验证方案和 properties创建一个 ChallengeResult

(继承自 ControllerBase)
Challenge(AuthenticationProperties, String[])

ChallengeResult使用指定的身份验证方案和 properties创建 。

(继承自 ControllerBase)
Challenge(String[])

ChallengeResult使用指定的身份验证方案创建 。

(继承自 ControllerBase)
Conflict()

ConflictResult创建生成响应的 Status409Conflict

(继承自 ControllerBase)
Conflict(ModelStateDictionary)

ConflictObjectResult创建生成响应的 Status409Conflict

(继承自 ControllerBase)
Conflict(Object)

ConflictObjectResult创建生成响应的 Status409Conflict

(继承自 ControllerBase)
Content(String)

ContentResult通过指定content字符串创建 对象。

(继承自 ControllerBase)
Content(String, MediaTypeHeaderValue)

ContentResult通过指定content字符串和 contentType创建 对象。

(继承自 ControllerBase)
Content(String, String)

ContentResult通过指定content字符串和内容类型创建 对象。

(继承自 ControllerBase)
Content(String, String, Encoding)

ContentResult通过指定content字符串 、 contentTypecontentEncoding来创建 对象。

(继承自 ControllerBase)
Created()

创建生成 CreatedResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
Created(String, Object)

创建生成 CreatedResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
Created(Uri, Object)

创建生成 CreatedResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
CreatedAtAction(String, Object)

创建生成 CreatedAtActionResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
CreatedAtAction(String, Object, Object)

创建生成 CreatedAtActionResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
CreatedAtAction(String, String, Object, Object)

创建生成 CreatedAtActionResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
CreatedAtRoute(Object, Object)

创建生成 CreatedAtRouteResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
CreatedAtRoute(String, Object)

创建生成 CreatedAtRouteResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
CreatedAtRoute(String, Object, Object)

创建生成 CreatedAtRouteResult 响应的 Status201Created 对象。

(继承自 ControllerBase)
Dispose()

具有视图支持的 MVC 控制器的基类。

Dispose(Boolean)

释放此 Controller 实例当前使用的所有资源。

File(Byte[], String)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定 contentType 为 Content-Type。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Byte[], String, Boolean)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定 contentType 为 Content-Type。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定 contentType 为 Content-Type。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定 contentType 为 Content-Type。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Byte[], String, String)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Byte[], String, String, Boolean)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回一个文件,其中指定 fileContents 为内容 (Status200OK) ,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String)

返回指定 fileStream (Status200OK) 的文件,指定的 contentType 作为 Content-Type。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String, Boolean)

返回指定 fileStream (Status200OK) 的文件,指定的 contentType 作为 Content-Type。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回指定 fileStream (Status200OK) 中的文件,以及指定 contentType 为 Content-Type 的 。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回指定 fileStream (Status200OK) 中的文件,以及指定 contentType 为 Content-Type 的 。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String, String)

返回指定 fileStream (Status200OK) 的文件,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String, String, Boolean)

返回指定 fileStream (Status200OK) 的文件,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回指定 fileStream (Status200OK) 的文件,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

(继承自 ControllerBase)
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回指定 fileStream (Status200OK) 的文件,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String)

返回由 virtualPath (Status200OK) 指定的文件,并将 指定 contentType 为 Content-Type。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String, Boolean)

返回由 virtualPath (Status200OK) 指定的文件,并将 指定 contentType 为 Content-Type。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回由 virtualPath (Status200OK) 指定的文件,以及指定 contentType 为 Content-Type 的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回由 virtualPath (Status200OK) 指定的文件,以及指定 contentType 为 Content-Type 的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String, String)

返回由 virtualPath (Status200OK) 指定的文件, contentType 指定的 作为 Content-Type,而指定 fileDownloadName 为建议的文件名。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String, String, Boolean)

返回由 virtualPath (Status200OK) 指定的文件, contentType 指定的 作为 Content-Type,而指定 fileDownloadName 为建议的文件名。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回由 virtualPath (Status200OK) 指定的文件、指定 contentType 为 Content-Type 的文件和指定 fileDownloadName 为建议文件名的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回由 virtualPath (Status200OK) 指定的文件、指定 contentType 为 Content-Type 的文件和指定 fileDownloadName 为建议文件名的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
Forbid()

默认情况下) ForbidResultStatus403Forbidden 创建 (。

(继承自 ControllerBase)
Forbid(AuthenticationProperties)

默认情况下,ForbidResultStatus403Forbidden使用指定的 properties创建 () 。

(继承自 ControllerBase)
Forbid(AuthenticationProperties)

ForbidResult使用指定的 properties创建 。

(继承自 ControllerBase)
Forbid(AuthenticationProperties, String[])

默认情况下,ForbidResultStatus403Forbidden使用指定的身份验证方案和 properties创建) (。

(继承自 ControllerBase)
Forbid(AuthenticationProperties, String[])

ForbidResult使用指定的身份验证方案和 properties创建 。

(继承自 ControllerBase)
Forbid(String[])

默认情况下, ForbidResult 使用指定的身份验证方案创建) (Status403Forbidden

(继承自 ControllerBase)
Json(Object)

创建一个 JsonResult 对象,该对象将指定的 data 对象序列化为 JSON。

Json(Object, JsonSerializerSettings)

创建一个 JsonResult 对象,该对象将指定的 data 对象序列化为 JSON。

Json(Object, Object)

创建一个 JsonResult 对象,该对象将指定的 data 对象序列化为 JSON。

LocalRedirect(String)

创建一个 LocalRedirectResult 对象,该对象将 (Status302Found) 重定向到指定的本地 localUrl

(继承自 ControllerBase)
LocalRedirectPermanent(String)

LocalRedirectResultPermanent使用指定的 localUrl创建设置为 true 的对象, (Status301MovedPermanently) 。

(继承自 ControllerBase)
LocalRedirectPermanentPreserveMethod(String)

使用指定的 localUrl创建一个LocalRedirectResult对象Permanent,并将 设置为 true PreserveMethod (Status308PermanentRedirect) 。

(继承自 ControllerBase)
LocalRedirectPreserveMethod(String)

LocalRedirectResultPermanent使用指定的 localUrl创建设置为 false 且PreserveMethod设置为 true 的对象,Status307TemporaryRedirect () 。

(继承自 ControllerBase)
NoContent()

创建一个 NoContentResult 对象,该对象生成空 Status204NoContent 响应。

(继承自 ControllerBase)
NotFound()

创建一个 NotFoundResult 生成响应的 Status404NotFound

(继承自 ControllerBase)
NotFound(Object)

创建一个 NotFoundObjectResult 生成响应的 Status404NotFound

(继承自 ControllerBase)
Ok()

创建一个 OkResult 对象,该对象生成空 Status200OK 响应。

(继承自 ControllerBase)
Ok(Object)

创建一个 OkObjectResult 生成响应的对象 Status200OK

(继承自 ControllerBase)
OnActionExecuted(ActionExecutedContext)

在调用操作方法后调用。

OnActionExecuting(ActionExecutingContext)

在调用操作方法前调用。

OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)

在调用操作方法前调用。

PartialView()

创建一个 PartialViewResult 对象,该对象将分部视图呈现给响应。

PartialView(Object)

PartialViewResult通过指定要model由分部视图呈现的 来创建 对象。

PartialView(String)

PartialViewResult通过指定 viewName创建 对象。

PartialView(String, Object)

PartialViewResult通过指定要viewName由分部视图呈现的 和 model 来创建 对象。

PhysicalFile(String, String)

返回由 physicalPath (Status200OK) 指定的文件,并将 指定 contentType 为 Content-Type。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
PhysicalFile(String, String, Boolean)

返回由 physicalPath (Status200OK) 指定的文件,并将 指定 contentType 为 Content-Type。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回由 physicalPath (Status200OK) 指定的文件,以及指定 contentType 为 Content-Type 的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回由 physicalPath (Status200OK) 指定的文件,以及指定 contentType 为 Content-Type 的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
PhysicalFile(String, String, String)

返回由 physicalPath (Status200OK) 指定的文件, contentType 指定的 作为 Content-Type,而指定 fileDownloadName 为建议的文件名。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
PhysicalFile(String, String, String, Boolean)

返回由 physicalPath (Status200OK) 指定的文件, contentType 指定的 作为 Content-Type,而指定 fileDownloadName 为建议的文件名。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

返回由 physicalPath (Status200OK) 指定的文件、指定 contentType 为 Content-Type 的文件和指定 fileDownloadName 为建议文件名的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

返回由 physicalPath (Status200OK) 指定的文件、指定 contentType 为 Content-Type 的文件和指定 fileDownloadName 为建议文件名的文件。 如果范围) 不满意,Status206PartialContentStatus416RangeNotSatisfiable则支持 (范围请求。

(继承自 ControllerBase)
Problem(String, String, Nullable<Int32>, String, String)

创建一个 ObjectResult 生成响应的 ProblemDetails

(继承自 ControllerBase)
Redirect(String)

创建一个 RedirectResult 对象,该对象将 (Status302Found) 重定向到指定的 url

(继承自 ControllerBase)
RedirectPermanent(String)

RedirectResultPermanent使用指定的 url创建设置为 true 的对象, (Status301MovedPermanently) 。

(继承自 ControllerBase)
RedirectPermanentPreserveMethod(String)

使用指定的 url创建一个RedirectResult对象Permanent,并将 设置为 true PreserveMethod (Status308PermanentRedirect) 。

(继承自 ControllerBase)
RedirectPreserveMethod(String)

RedirectResultPermanent使用指定的 url创建设置为 false 且PreserveMethod设置为 true 的对象,Status307TemporaryRedirect () 。

(继承自 ControllerBase)
RedirectToAction()

将 (Status302Found) 重定向到与当前操作同名的操作。 “controller”和“action”名称是从当前请求的环境值检索的。

(继承自 ControllerBase)
RedirectToAction(String)

使用 actionName将 (Status302Found) 重定向到指定的操作。

(继承自 ControllerBase)
RedirectToAction(String, Object)

使用 actionNamerouteValues将 (Status302Found) 重定向到指定的操作。

(继承自 ControllerBase)
RedirectToAction(String, String)

使用 actionNamecontrollerName将 (Status302Found) 重定向到指定的操作。

(继承自 ControllerBase)
RedirectToAction(String, String, Object)

Status302Found 使用指定的 、 controllerNamerouteValues将 () 重定向到指定的actionName操作。

(继承自 ControllerBase)
RedirectToAction(String, String, Object, String)

Status302Found 使用指定的 、、 controllerNamerouteValuesfragment将) (重定向到指定的actionName操作。

(继承自 ControllerBase)
RedirectToAction(String, String, String)

Status302Found 使用指定的 、 controllerNamefragment将 () 重定向到指定的actionName操作。

(继承自 ControllerBase)
RedirectToActionPermanent(String)

使用指定的 将 (Status301MovedPermanently) 重定向到设置为 true 的指定actionName操作Permanent

(继承自 ControllerBase)
RedirectToActionPermanent(String, Object)

使用指定的 和 routeValues将) Status301MovedPermanently (重定向到设置为 true 的指定actionName操作Permanent

(继承自 ControllerBase)
RedirectToActionPermanent(String, String)

使用指定的 和 controllerName将) Status301MovedPermanently (重定向到设置为 true 的指定actionName操作Permanent

(继承自 ControllerBase)
RedirectToActionPermanent(String, String, Object)

使用指定的 、 和 将 (Status301MovedPermanently) 重定向到设置为 true 的指定actionName操作PermanentrouteValuescontrollerName

(继承自 ControllerBase)
RedirectToActionPermanent(String, String, Object, String)

使用指定的 、、 routeValuescontrollerNamefragment将 (Status301MovedPermanently) 重定向到设置为 true 的指定actionName操作Permanent

(继承自 ControllerBase)
RedirectToActionPermanent(String, String, String)

使用指定的 、 和 将 (Status301MovedPermanently) 重定向到设置为 true 的指定actionName操作PermanentfragmentcontrollerName

(继承自 ControllerBase)
RedirectToActionPermanentPreserveMethod(String, String, Object, String)

使用指定的 、、 controllerNamerouteValuesfragment将 (Status308PermanentRedirect) 重定向到设置为 true 且PreserveMethod设置为 true 的指定actionName操作Permanent

(继承自 ControllerBase)
RedirectToActionPreserveMethod(String, String, Object, String)

使用指定的 、、 和 将 (Status307TemporaryRedirect) 重定向到设置为 false 且PreserveMethod设置为 true 的指定routeValuesactionNamecontrollerName操作。Permanentfragment

(继承自 ControllerBase)
RedirectToPage(String)

将 (Status302Found) 重定向到指定的 pageName

(继承自 ControllerBase)
RedirectToPage(String, Object)

使用指定的 将 (Status302Found) 重定向到指定的 pageNamerouteValues

(继承自 ControllerBase)
RedirectToPage(String, String)

使用指定的 将 (Status302Found) 重定向到指定的 pageNamepageHandler

(继承自 ControllerBase)
RedirectToPage(String, String, Object)

将 (Status302Found) 重定向到指定的 pageName

(继承自 ControllerBase)
RedirectToPage(String, String, Object, String)

使用指定的 和 将 (Status302Found) 重定向到指定的 pageNamerouteValuesfragment

(继承自 ControllerBase)
RedirectToPage(String, String, String)

使用指定的 将 (Status302Found) 重定向到指定的 pageNamefragment

(继承自 ControllerBase)
RedirectToPagePermanent(String)

将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 ControllerBase)
RedirectToPagePermanent(String, Object)

使用指定的 将 (Status301MovedPermanently) 重定向到指定的 pageNamerouteValues

(继承自 ControllerBase)
RedirectToPagePermanent(String, String)

使用指定的 将 (Status301MovedPermanently) 重定向到指定的 pageNamepageHandler

(继承自 ControllerBase)
RedirectToPagePermanent(String, String, Object, String)

使用指定的 和 将 (Status301MovedPermanently) 重定向到指定的 pageNamerouteValuesfragment

(继承自 ControllerBase)
RedirectToPagePermanent(String, String, String)

使用指定的 将 (Status301MovedPermanently) 重定向到指定的 pageNamefragment

(继承自 ControllerBase)
RedirectToPagePermanentPreserveMethod(String, String, Object, String)

使用pageName指定的 、 routeValuesfragment将) Status308PermanentRedirect (重定向到指定路由Permanent(设置为 true 和 PreserveMethod 设置为 true)。

(继承自 ControllerBase)
RedirectToPagePreserveMethod(String, String, Object, String)

使用指定的 、 和 将 (Status307TemporaryRedirect) 重定向到设置为 false 且PreserveMethod设置为 true 的指定pageName页面PermanentfragmentrouteValues

(继承自 ControllerBase)
RedirectToRoute(Object)

使用指定的 将 (Status302Found) 重定向到指定的 routeValues路由。

(继承自 ControllerBase)
RedirectToRoute(String)

使用指定的 将 (Status302Found) 重定向到指定的 routeName路由。

(继承自 ControllerBase)
RedirectToRoute(String, Object)

Status302Found 使用指定的 和 routeValues将 () 重定向到指定的routeName路由。

(继承自 ControllerBase)
RedirectToRoute(String, Object, String)

Status302Found 使用指定的 、 routeValuesfragment将 () 重定向到指定的routeName路由。

(继承自 ControllerBase)
RedirectToRoute(String, String)

Status302Found 使用指定的 和 fragment将 () 重定向到指定的routeName路由。

(继承自 ControllerBase)
RedirectToRoutePermanent(Object)

使用指定的 将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeValues路由Permanent

(继承自 ControllerBase)
RedirectToRoutePermanent(String)

使用指定的 将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeName路由Permanent

(继承自 ControllerBase)
RedirectToRoutePermanent(String, Object)

使用指定的 和 routeValues将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeName路由Permanent

(继承自 ControllerBase)
RedirectToRoutePermanent(String, Object, String)

使用routeName指定的 、 routeValuesfragment将 (Status301MovedPermanently) 重定向到指定路由,并将 Permanent 设置为 true。

(继承自 ControllerBase)
RedirectToRoutePermanent(String, String)

使用指定的 和 fragment将 (Status301MovedPermanently) 重定向到设置为 true 的指定routeName路由Permanent

(继承自 ControllerBase)
RedirectToRoutePermanentPreserveMethod(String, Object, String)

使用routeName指定的 、 routeValuesfragment将) Status308PermanentRedirect (重定向到指定路由Permanent(设置为 true 和 PreserveMethod 设置为 true)。

(继承自 ControllerBase)
RedirectToRoutePreserveMethod(String, Object, String)

使用指定的 、 和 将) Status307TemporaryRedirect (重定向到设置为 false 且PreserveMethod设置为 true 的指定routeName路由PermanentfragmentrouteValues

(继承自 ControllerBase)
SignIn(ClaimsPrincipal)

创建一个 SignInResult

(继承自 ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties)

SignInResult使用 创建 。properties

(继承自 ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String)

SignInResult使用指定的身份验证方案和 properties创建 。

(继承自 ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String)

SignInResult使用指定的身份验证方案和 properties创建 。

(继承自 ControllerBase)
SignIn(ClaimsPrincipal, String)

SignInResult使用指定的身份验证方案创建 。

(继承自 ControllerBase)
SignOut()

创建一个 SignOutResult

(继承自 ControllerBase)
SignOut(AuthenticationProperties)

SignOutResult使用 创建 。properties

(继承自 ControllerBase)
SignOut(AuthenticationProperties, String[])

SignOutResult使用指定的身份验证方案和 properties创建 。

(继承自 ControllerBase)
SignOut(AuthenticationProperties, String[])

SignOutResult使用指定的身份验证方案和 properties创建 。

(继承自 ControllerBase)
SignOut(String[])

SignOutResult使用指定的身份验证方案创建 。

(继承自 ControllerBase)
StatusCode(Int32)

StatusCodeResult通过指定 statusCode创建对象。

(继承自 ControllerBase)
StatusCode(Int32, Object)

ObjectResult通过指定 statusCode 和 创建对象value

(继承自 ControllerBase)
TryUpdateModelAsync(Object, Type, String)

使用控制器的当前IValueProvider值和 prefix中的值汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 valueProviderprefix汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync<TModel>(TModel)

使用控制器当前 IValueProvider中的值汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String)

使用控制器的当前IValueProvider值和 prefix中的值汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[])

使用控制器的当前IValueProvider值和 prefix中的值汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>)

使用控制器的当前IValueProvider值和 prefix中的值汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

使用 valueProviderprefix汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[])

使用 valueProviderprefix汇报指定的model实例。

(继承自 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 valueProviderprefix汇报指定的model实例。

(继承自 ControllerBase)
TryValidateModel(Object)

验证指定的 model 实例。

(继承自 ControllerBase)
TryValidateModel(Object, String)

验证指定的 model 实例。

(继承自 ControllerBase)
Unauthorized()

UnauthorizedResult创建生成响应的 Status401Unauthorized

(继承自 ControllerBase)
Unauthorized(Object)

创建一个 UnauthorizedObjectResult 生成响应的 Status401Unauthorized

(继承自 ControllerBase)
UnprocessableEntity()

创建一个 UnprocessableEntityResult 生成响应的 Status422UnprocessableEntity

(继承自 ControllerBase)
UnprocessableEntity(ModelStateDictionary)

创建一个 UnprocessableEntityObjectResult 生成响应的 Status422UnprocessableEntity

(继承自 ControllerBase)
UnprocessableEntity(Object)

创建一个 UnprocessableEntityObjectResult 生成响应的 Status422UnprocessableEntity

(继承自 ControllerBase)
ValidationProblem()

创建一个 , ActionResult 它从 生成 Status400BadRequest 包含验证错误的 ModelState响应。

(继承自 ControllerBase)
ValidationProblem(ModelStateDictionary)

创建一个 , ActionResult 它从 生成 Status400BadRequest 包含验证错误的 modelStateDictionary响应。

(继承自 ControllerBase)
ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary)

创建一个 , ActionResult 它生成 Status400BadRequest 具有 ValidationProblemDetails 值的响应。

(继承自 ControllerBase)
ValidationProblem(ValidationProblemDetails)

创建一个 BadRequestObjectResult 生成响应的 Status400BadRequest

(继承自 ControllerBase)
View()

创建一个 ViewResult 对象,该对象将视图呈现给响应。

View(Object)

ViewResult通过指定要model由视图呈现的 来创建 对象。

View(String)

ViewResult通过指定 viewName创建 对象。

View(String, Object)

ViewResult通过指定要viewName由视图呈现的 和 model 来创建 对象。

ViewComponent(String)

ViewComponentResult通过指定要呈现的视图组件的名称来创建 。

ViewComponent(String, Object)

ViewComponentResult通过指定要呈现的视图组件的名称来创建 。

ViewComponent(Type)

ViewComponentResult通过指定要Type呈现的视图组件的 创建 。

ViewComponent(Type, Object)

ViewComponentResult通过指定要Type呈现的视图组件的 创建 。

适用于