PageModel.BadRequest Metoda

Definicja

Przeciążenia

BadRequest()

Tworzy , BadRequestResult który generuje Status400BadRequest odpowiedź.

BadRequest(ModelStateDictionary)

Tworzy , BadRequestObjectResult który generuje Status400BadRequest odpowiedź.

BadRequest(Object)

Tworzy , BadRequestObjectResult który generuje Status400BadRequest odpowiedź.

BadRequest()

Tworzy , BadRequestResult który generuje Status400BadRequest odpowiedź.

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

Zwraca

BadRequestResult

Utworzony BadRequestResult dla odpowiedzi.

Atrybuty

Dotyczy

BadRequest(ModelStateDictionary)

Tworzy , BadRequestObjectResult który generuje Status400BadRequest odpowiedź.

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

Parametry

modelState
ModelStateDictionary

Zawierające ModelStateDictionary błędy, które mają zostać zwrócone do klienta.

Zwraca

BadRequestObjectResult

Utworzony BadRequestObjectResult dla odpowiedzi.

Atrybuty

Dotyczy

BadRequest(Object)

Tworzy , BadRequestObjectResult który generuje Status400BadRequest odpowiedź.

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

Parametry

error
Object

Obiekt błędu, który ma zostać zwrócony do klienta.

Zwraca

BadRequestObjectResult

Utworzony BadRequestObjectResult dla odpowiedzi.

Atrybuty

Dotyczy