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()

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

Accepted(Object)

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

Accepted(String)

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

Accepted(String, Object)

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

Accepted(Uri)

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

Accepted(Uri, Object)

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

AcceptedAtAction(String)

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

AcceptedAtAction(String, Object)

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

AcceptedAtAction(String, Object, Object)

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

AcceptedAtAction(String, String)

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

AcceptedAtAction(String, String, Object)

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

AcceptedAtAction(String, String, Object, Object)

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

AcceptedAtRoute(Object)

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

AcceptedAtRoute(Object, Object)

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

AcceptedAtRoute(String)

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

AcceptedAtRoute(String, Object)

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

AcceptedAtRoute(String, Object, Object)

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

BadRequest()

BadRequestResult创建生成响应的 Status400BadRequest

BadRequest(ModelStateDictionary)

BadRequestObjectResult创建生成响应的 Status400BadRequest

BadRequest(Object)

BadRequestObjectResult创建生成响应的 Status400BadRequest

Challenge()

创建一个 ChallengeResult

Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties创建 。

Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties创建 。

Challenge(AuthenticationProperties, String[])

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

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通过指定content字符串和 contentType创建 对象。

Content(String, String)

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

Content(String, String, Encoding)

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

Created()

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

Created(String, Object)

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

Created(Uri, Object)

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

CreatedAtAction(String, Object)

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

CreatedAtAction(String, Object, Object)

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

CreatedAtAction(String, String, Object, Object)

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

CreatedAtRoute(Object, Object)

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

CreatedAtRoute(String, Object)

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

CreatedAtRoute(String, Object, Object)

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

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 (Status200OK) 的文件,指定的 contentType 作为 Content-Type,指定的 fileDownloadName 作为建议的文件名。 如果范围) 不满意, Status206PartialContent 则支持 (范围 Status416RangeNotSatisfiable 请求。

File(Stream, String, String, Boolean)

返回指定 fileStream (Status200OK) 的文件,指定的 contentType 作为 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)

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

File(String, String, Boolean)

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

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

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

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

返回由 virtualPath (Status200OK) 指定的文件,以及指定 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[])

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

LocalRedirect(String)

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

LocalRedirectPermanent(String)

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

LocalRedirectPermanentPreserveMethod(String)

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

LocalRedirectPreserveMethod(String)

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

NoContent()

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

NotFound()

创建一个 NotFoundResult 生成响应的 Status404NotFound

NotFound(Object)

创建一个 NotFoundObjectResult 生成响应的 Status404NotFound

Ok()

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

Ok(Object)

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

PhysicalFile(String, String)

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

PhysicalFile(String, String, Boolean)

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

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

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

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

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

PhysicalFile(String, String, String)

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

PhysicalFile(String, String, String, Boolean)

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

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

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

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

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

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

创建一个 ObjectResult 生成响应的 ProblemDetails

Redirect(String)

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

RedirectPermanent(String)

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

RedirectPermanentPreserveMethod(String)

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

RedirectPreserveMethod(String)

RedirectResultPermanent使用指定的 url创建设置为 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)

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

RedirectToAction(String, String, Object, String)

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

RedirectToAction(String, String, String)

Status302Found 使用指定的 、 controllerNamefragment将 () 重定向到指定的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)

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

RedirectToActionPermanent(String, String, Object, String)

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

RedirectToActionPermanent(String, String, String)

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

RedirectToActionPermanentPreserveMethod(String, String, Object, String)

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

RedirectToActionPreserveMethod(String, String, Object, String)

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

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)

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

RedirectToPagePreserveMethod(String, String, Object, String)

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

RedirectToRoute(Object)

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

RedirectToRoute(String)

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

RedirectToRoute(String, Object)

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

RedirectToRoute(String, Object, String)

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

RedirectToRoute(String, String)

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

RedirectToRoutePermanent(Object)

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

RedirectToRoutePermanent(String)

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

RedirectToRoutePermanent(String, Object)

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

RedirectToRoutePermanent(String, Object, String)

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

RedirectToRoutePermanent(String, String)

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

RedirectToRoutePermanentPreserveMethod(String, Object, String)

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

RedirectToRoutePreserveMethod(String, Object, String)

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

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)

StatusCodeResult通过指定 statusCode创建对象。

StatusCode(Int32, Object)

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

TryUpdateModelAsync(Object, Type, String)

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

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

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

TryUpdateModelAsync<TModel>(TModel)

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

TryUpdateModelAsync<TModel>(TModel, String)

使用控制器的当前IValueProvider值和 prefix中的值汇报指定的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>>[])

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

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

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

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

适用于