Partager via


PageModel.BadRequest Méthode

Définition

Surcharges

BadRequest()

Crée un BadRequestResult qui produit une Status400BadRequest réponse.

BadRequest(ModelStateDictionary)

Crée un BadRequestObjectResult qui produit une Status400BadRequest réponse.

BadRequest(Object)

Crée un BadRequestObjectResult qui produit une Status400BadRequest réponse.

BadRequest()

Source:
PageModel.cs
Source:
PageModel.cs
Source:
PageModel.cs

Crée un BadRequestResult qui produit une Status400BadRequest réponse.

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

Retours

créé BadRequestResult pour la réponse.

Attributs

S’applique à

BadRequest(ModelStateDictionary)

Source:
PageModel.cs
Source:
PageModel.cs
Source:
PageModel.cs

Crée un BadRequestObjectResult qui produit une Status400BadRequest réponse.

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);
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
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

Paramètres

modelState
ModelStateDictionary

Contenant les ModelStateDictionary erreurs à retourner au client.

Retours

créé BadRequestObjectResult pour la réponse.

Attributs

S’applique à

BadRequest(Object)

Source:
PageModel.cs
Source:
PageModel.cs
Source:
PageModel.cs

Crée un BadRequestObjectResult qui produit une Status400BadRequest réponse.

public:
 virtual Microsoft::AspNetCore::Mvc::BadRequestObjectResult ^ BadRequest(System::Object ^ error);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest (object error);
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
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

Paramètres

error
Object

Objet d’erreur à retourner au client.

Retours

créé BadRequestObjectResult pour la réponse.

Attributs

S’applique à