ControllerBase.UnprocessableEntity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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()
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
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
The created UnprocessableEntityResult for the response.
- Attributes
Applies to
UnprocessableEntity(ModelStateDictionary)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
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
The created UnprocessableEntityObjectResult for the response.
- Attributes
Applies to
UnprocessableEntity(Object)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
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]
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
The created UnprocessableEntityObjectResult for the response.
- Attributes