Results.UnprocessableEntity Method

Definition

Overloads

UnprocessableEntity(Object)

Source:
Results.cs

Produces a Status422UnprocessableEntity response.

C#
public static Microsoft.AspNetCore.Http.IResult UnprocessableEntity (object? error = default);

Parameters

error
Object

An error object to be included in the HTTP response body.

Returns

The created IResult for the response.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 6.0, 7.0, 8.0, 9.0

UnprocessableEntity<TValue>(TValue)

Source:
Results.cs

Produces a Status422UnprocessableEntity response.

C#
public static Microsoft.AspNetCore.Http.IResult UnprocessableEntity<TValue> (TValue? error);

Type Parameters

TValue

Parameters

error
TValue

An error object to be included in the HTTP response body.

Returns

The created IResult for the response.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 7.0, 8.0, 9.0