共用方式為


ControllerBase.UnprocessableEntity 方法

定義

多載

UnprocessableEntity()

UnprocessableEntityResult建立產生回應的 Status422UnprocessableEntity

UnprocessableEntity(ModelStateDictionary)

UnprocessableEntityObjectResult建立產生回應的 Status422UnprocessableEntity

UnprocessableEntity(Object)

UnprocessableEntityObjectResult建立產生回應的 Status422UnprocessableEntity

UnprocessableEntity()

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
ControllerBase.cs
public:
 virtual Microsoft::AspNetCore::Mvc::UnprocessableEntityResult ^ UnprocessableEntity();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.UnprocessableEntityResult UnprocessableEntity ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member UnprocessableEntity : unit -> Microsoft.AspNetCore.Mvc.UnprocessableEntityResult
override this.UnprocessableEntity : unit -> Microsoft.AspNetCore.Mvc.UnprocessableEntityResult
Public Overridable Function UnprocessableEntity () As UnprocessableEntityResult

傳回

為回應建立 UnprocessableEntityResult 的 。

屬性

適用於

UnprocessableEntity(ModelStateDictionary)

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
ControllerBase.cs
public:
 virtual Microsoft::AspNetCore::Mvc::UnprocessableEntityObjectResult ^ UnprocessableEntity(Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult UnprocessableEntity (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member UnprocessableEntity : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult
override this.UnprocessableEntity : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult
Public Overridable Function UnprocessableEntity (modelState As ModelStateDictionary) As UnprocessableEntityObjectResult

參數

modelState
ModelStateDictionary

包含 ModelStateDictionary 要傳回給用戶端的錯誤。

傳回

為回應建立 UnprocessableEntityObjectResult 的 。

屬性

適用於

UnprocessableEntity(Object)

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
ControllerBase.cs
public:
 virtual Microsoft::AspNetCore::Mvc::UnprocessableEntityObjectResult ^ UnprocessableEntity(System::Object ^ error);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult UnprocessableEntity (object error);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult UnprocessableEntity (object? error);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member UnprocessableEntity : obj -> Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult
override this.UnprocessableEntity : obj -> Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult
Public Overridable Function UnprocessableEntity (error As Object) As UnprocessableEntityObjectResult

參數

error
Object

要傳回給用戶端的錯誤物件。

傳回

為回應建立 UnprocessableEntityObjectResult 的 。

屬性

適用於