ControllerBase.UnprocessableEntity Method

Definition

Overloads

UnprocessableEntity()

Creates an UnprocessableEntityResult that produces a Status422UnprocessableEntity response.

UnprocessableEntity(ModelStateDictionary)

Creates an UnprocessableEntityObjectResult that produces a Status422UnprocessableEntity response.

UnprocessableEntity(Object)

Creates an UnprocessableEntityObjectResult that produces a Status422UnprocessableEntity response.

UnprocessableEntity()

Creates an UnprocessableEntityResult that produces a Status422UnprocessableEntity response.

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

Returns

UnprocessableEntityResult

The created UnprocessableEntityResult for the response.

Attributes

Applies to

UnprocessableEntity(ModelStateDictionary)

Creates an UnprocessableEntityObjectResult that produces a Status422UnprocessableEntity response.

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

Parameters

modelState
ModelStateDictionary

The ModelStateDictionary containing errors to be returned to the client.

Returns

UnprocessableEntityObjectResult

The created UnprocessableEntityObjectResult for the response.

Attributes

Applies to

UnprocessableEntity(Object)

Creates an UnprocessableEntityObjectResult that produces a Status422UnprocessableEntity response.

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>]
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

Parameters

error
Object

An error object to be returned to the client.

Returns

UnprocessableEntityObjectResult

The created UnprocessableEntityObjectResult for the response.

Attributes

Applies to