语言

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

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

Accepted(Object)

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

Accepted(String)

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

Accepted(String, Object)

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

Accepted(Uri)

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

Accepted(Uri, Object)

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

AcceptedAtAction(String)

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

AcceptedAtAction(String, Object)

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

AcceptedAtAction(String, Object, Object)

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

AcceptedAtAction(String, String)

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

AcceptedAtAction(String, String, Object)

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

AcceptedAtAction(String, String, Object, Object)

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

AcceptedAtRoute(Object)

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

AcceptedAtRoute(Object, Object)

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

AcceptedAtRoute(String)

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

AcceptedAtRoute(String, Object)

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

AcceptedAtRoute(String, Object, Object)

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

BadRequest()

创建生成 Status400BadRequest 响应的 BadRequestResult。

BadRequest(ModelStateDictionary)

创建生成 Status400BadRequest 响应的 BadRequestObjectResult。

BadRequest(Object)

创建生成 Status400BadRequest 响应的 BadRequestObjectResult。

Challenge()

创建 ChallengeResult。

Challenge(AuthenticationProperties)

使用指定的 properties创建 ChallengeResult。

Challenge(AuthenticationProperties)

使用指定的 properties创建 ChallengeResult。

Challenge(AuthenticationProperties, String[])

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

Challenge(AuthenticationProperties, String[])

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

Challenge(String[])

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

Conflict()

创建生成 Status409Conflict 响应的 ConflictResult。

Conflict(ModelStateDictionary)

创建生成 Status409Conflict 响应的 ConflictObjectResult。

Conflict(Object)

创建生成 Status409Conflict 响应的 ConflictObjectResult。

Content(String)

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

Content(String, MediaTypeHeaderValue)

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

Content(String, String)

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

Content(String, String, Encoding)

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

Created()

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

Created(String, Object)

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

Created(Uri, Object)

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

CreatedAtAction(String, Object)

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

CreatedAtAction(String, Object, Object)

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

CreatedAtAction(String, String, Object, Object)

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

CreatedAtRoute(Object, Object)

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

CreatedAtRoute(String, Object)

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

CreatedAtRoute(String, Object, Object)

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

File(Byte[], String)

返回具有指定 fileContents 作为内容(Status200OK)的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

File(Byte[], String, Boolean)

返回具有指定 fileContents 作为内容(Status200OK)的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回具有指定 fileContents 作为内容(Status200OK)的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回具有指定 fileContents 作为内容(Status200OK)的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,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 作为内容类型的文件。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

File(Stream, String, Boolean)

返回指定 fileStream(Status200OK),指定 contentType 作为内容类型的文件。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回指定 fileStream(Status200OK)中的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回指定 fileStream(Status200OK)中的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,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 作为内容类型的文件,并将指定的 fileDownloadName 作为建议的文件名。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回指定 fileStream(Status200OK)、指定 contentType 作为内容类型的文件,并将指定的 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 作为内容类型。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回由 virtualPath(Status200OK)指定的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,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 作为内容类型指定的文件,并将指定的 fileDownloadName 作为建议的文件名返回。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回由 virtualPath(Status200OK)、指定 contentType 作为内容类型指定的文件,并将指定的 fileDownloadName 作为建议的文件名返回。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

Forbid()

创建 ForbidResult(默认情况下Status403Forbidden)。

Forbid(AuthenticationProperties)

使用指定的 properties创建一个 ForbidResult(默认Status403Forbidden)。

Forbid(AuthenticationProperties)

使用指定的 properties创建 ForbidResult。

Forbid(AuthenticationProperties, String[])

使用指定的身份验证方案和 properties创建一个 ForbidResult(默认Status403Forbidden)。

Forbid(AuthenticationProperties, String[])

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

Forbid(String[])

使用指定的身份验证方案创建 ForbidResult(默认Status403Forbidden)。

LocalRedirect(String)

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

LocalRedirectPermanent(String)

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

LocalRedirectPermanentPreserveMethod(String)

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

LocalRedirectPreserveMethod(String)

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

NoContent()

创建生成空 Status204NoContent 响应的 NoContentResult 对象。

NotFound()

创建生成 Status404NotFound 响应的 NotFoundResult。

NotFound(Object)

创建生成 Status404NotFound 响应的 NotFoundObjectResult。

Ok()

创建生成空 Status200OK 响应的 OkResult 对象。

Ok(Object)

创建生成 Status200OK 响应的 OkObjectResult 对象。

PhysicalFile(String, String)

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

PhysicalFile(String, String, Boolean)

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

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

返回由 physicalPath(Status200OK)指定的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回由 physicalPath(Status200OK)指定的文件,并将指定的 contentType 作为内容类型。 这支持范围请求(如果范围不满足,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 作为内容类型指定的文件,并将指定的 fileDownloadName 作为建议的文件名返回。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

返回由 physicalPath(Status200OK)、指定 contentType 作为内容类型指定的文件,并将指定的 fileDownloadName 作为建议的文件名返回。 这支持范围请求(如果范围不满足,Status206PartialContent 或 Status416RangeNotSatisfiable)。

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

创建生成 ProblemDetails 响应的 ObjectResult。

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

创建生成 ProblemDetails 响应的 ObjectResult。

Redirect(String)

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

RedirectPermanent(String)

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

RedirectPermanentPreserveMethod(String)

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

RedirectPreserveMethod(String)

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

RedirectToAction()

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

RedirectToAction(String)

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

RedirectToAction(String, Object)

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

RedirectToAction(String, String)

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

RedirectToAction(String, String, Object)

使用指定的 actionName、controllerName和 routeValues将指定的操作重定向(Status302Found)。

RedirectToAction(String, String, Object, String)

使用指定的 actionName、controllerName、routeValues和 fragment将指定操作重定向(Status302Found)。

RedirectToAction(String, String, String)

使用指定的 actionName、controllerName和 fragment将指定的操作重定向(Status302Found)。

RedirectToActionPermanent(String)

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

RedirectToActionPermanent(String, Object)

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

RedirectToActionPermanent(String, String)

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

RedirectToActionPermanent(String, String, Object)

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

RedirectToActionPermanent(String, String, Object, String)

使用指定的 actionName、controllerName、routeValues和 fragment将 Permanent 设置为 true 的指定操作(Status301MovedPermanently)。

RedirectToActionPermanent(String, String, String)

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

RedirectToActionPermanentPreserveMethod(String, String, Object, String)

使用指定的 actionName、controllerName、routeValues和 fragment,将 Permanent 设置为 true 并 PreserveMethod 设置为 true 的指定操作(Status308PermanentRedirect)。

RedirectToActionPreserveMethod(String, String, Object, String)

使用指定的 actionName、Status307TemporaryRedirectcontrollerName、routeValues和 fragment将 Permanent 设置为 false 且 PreserveMethod 设置为 true 的指定操作。

RedirectToPage(String)

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

RedirectToPage(String, Object)

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

RedirectToPage(String, String)

使用指定的 pageHandler将 (Status302Found) 重定向到指定的 pageName。

RedirectToPage(String, String, Object)

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

RedirectToPage(String, String, Object, String)

使用指定的 routeValues 和 fragment将 (Status302Found) 重定向到指定的 pageName。

RedirectToPage(String, String, String)

使用指定的 fragment将 (Status302Found) 重定向到指定的 pageName。

RedirectToPagePermanent(String)

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

RedirectToPagePermanent(String, Object)

使用指定的 routeValues将 (Status301MovedPermanently) 重定向到指定的 pageName。

RedirectToPagePermanent(String, String)

使用指定的 pageHandler将 (Status301MovedPermanently) 重定向到指定的 pageName。

RedirectToPagePermanent(String, String, Object, String)

使用指定的 routeValues 和 fragment将 (Status301MovedPermanently) 重定向到指定的 pageName。

RedirectToPagePermanent(String, String, String)

使用指定的 fragment将 (Status301MovedPermanently) 重定向到指定的 pageName。

RedirectToPagePermanentPreserveMethod(String, String, Object, String)

使用指定的 pageName、Status308PermanentRedirectrouteValues和 fragment,将 Permanent 重定向到指定路由,PreserveMethod 设置为 true。

RedirectToPagePreserveMethod(String, String, Object, String)

使用指定的 pageName、routeValues和 fragment将 Permanent 设置为 false 且 PreserveMethod 设置为 true 的指定页面(Status307TemporaryRedirect)。

RedirectToRoute(Object)

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

RedirectToRoute(String)

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

RedirectToRoute(String, Object)

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

RedirectToRoute(String, Object, String)

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

RedirectToRoute(String, String)

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

RedirectToRoutePermanent(Object)

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

RedirectToRoutePermanent(String)

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

RedirectToRoutePermanent(String, Object)

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

RedirectToRoutePermanent(String, Object, String)

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

RedirectToRoutePermanent(String, String)

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

RedirectToRoutePermanentPreserveMethod(String, Object, String)

使用指定的 routeName、Status308PermanentRedirectrouteValues和 fragment,将 Permanent 重定向到指定路由,PreserveMethod 设置为 true。

RedirectToRoutePreserveMethod(String, Object, String)

使用指定的 routeName、routeValues和 fragment将 Permanent 设置为 false 且 PreserveMethod 设置为 true 的指定路由(Status307TemporaryRedirect) 。

SignIn(ClaimsPrincipal)

创建 SignInResult。

SignIn(ClaimsPrincipal, AuthenticationProperties)

使用 properties创建 SignInResult。

SignIn(ClaimsPrincipal, AuthenticationProperties, String)

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

SignIn(ClaimsPrincipal, AuthenticationProperties, String)

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

SignIn(ClaimsPrincipal, String)

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

SignOut()

创建 SignOutResult。

SignOut(AuthenticationProperties)

使用 properties创建 SignOutResult。

SignOut(AuthenticationProperties, String[])

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

SignOut(AuthenticationProperties, String[])

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

SignOut(String[])

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

StatusCode(Int32)

通过指定 statusCode创建 StatusCodeResult 对象。

StatusCode(Int32, Object)

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

TryUpdateModelAsync(Object, Type, String)

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

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

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

TryUpdateModelAsync<TModel>(TModel)

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

TryUpdateModelAsync<TModel>(TModel, String)

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

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

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

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

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

TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

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

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

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

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

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

TryValidateModel(Object)

验证指定的 model 实例。

TryValidateModel(Object, String)

验证指定的 model 实例。

Unauthorized()

创建生成 Status401Unauthorized 响应的 UnauthorizedResult。

Unauthorized(Object)

创建生成 Status401Unauthorized 响应的 UnauthorizedObjectResult。

UnprocessableEntity()

创建生成 Status422UnprocessableEntity 响应的 UnprocessableEntityResult。

UnprocessableEntity(ModelStateDictionary)

创建生成 Status422UnprocessableEntity 响应的 UnprocessableEntityObjectResult。

UnprocessableEntity(Object)

创建生成 Status422UnprocessableEntity 响应的 UnprocessableEntityObjectResult。

ValidationProblem()

创建一个 ActionResult,该 Status400BadRequest 响应包含来自 ModelState的验证错误。

ValidationProblem(ModelStateDictionary)

创建一个 ActionResult,该 Status400BadRequest 响应包含来自 modelStateDictionary的验证错误。

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

创建生成具有 ValidationProblemDetails 值的 Status400BadRequest 响应的 ActionResult。

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

创建生成具有 ValidationProblemDetails 值的 Status400BadRequest 响应的 ActionResult。

ValidationProblem(ValidationProblemDetails)

创建生成 Status400BadRequest 响应的 BadRequestObjectResult。

适用于