Condividi tramite


ControllerBase.BadRequest Metodo

Definizione

Overload

BadRequest()

Crea un BadRequestResult che produce una risposta Status400BadRequest.

BadRequest(ModelStateDictionary)

Crea un BadRequestObjectResult che produce una risposta Status400BadRequest.

BadRequest(Object)

Crea un BadRequestObjectResult che produce una risposta Status400BadRequest.

BadRequest()

Origine:
ControllerBase.cs
Origine:
ControllerBase.cs
Origine:
ControllerBase.cs

Crea un BadRequestResult che produce una risposta Status400BadRequest.

public:
 virtual Microsoft::AspNetCore::Mvc::BadRequestResult ^ BadRequest();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestResult BadRequest ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
override this.BadRequest : unit -> Microsoft.AspNetCore.Mvc.BadRequestResult
Public Overridable Function BadRequest () As BadRequestResult

Restituisce

Il BadRequestResult creato per la risposta.

Attributi

Si applica a

BadRequest(ModelStateDictionary)

Origine:
ControllerBase.cs
Origine:
ControllerBase.cs
Origine:
ControllerBase.cs

Crea un BadRequestObjectResult che produce una risposta Status400BadRequest.

public:
 virtual Microsoft::AspNetCore::Mvc::BadRequestObjectResult ^ BadRequest(Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member BadRequest : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
override this.BadRequest : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
Public Overridable Function BadRequest (modelState As ModelStateDictionary) As BadRequestObjectResult

Parametri

modelState
ModelStateDictionary

Il ModelStateDictionary contenente errori da restituire al client.

Restituisce

Il BadRequestObjectResult creato per la risposta.

Attributi

Si applica a

BadRequest(Object)

Origine:
ControllerBase.cs
Origine:
ControllerBase.cs
Origine:
ControllerBase.cs

Crea un BadRequestObjectResult che produce una risposta Status400BadRequest.

public:
 virtual Microsoft::AspNetCore::Mvc::BadRequestObjectResult ^ BadRequest(System::Object ^ error);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (object error);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (object? error);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member BadRequest : obj -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
override this.BadRequest : obj -> Microsoft.AspNetCore.Mvc.BadRequestObjectResult
Public Overridable Function BadRequest (error As Object) As BadRequestObjectResult

Parametri

error
Object

Oggetto di errore da restituire al client.

Restituisce

Il BadRequestObjectResult creato per la risposta.

Attributi

Si applica a