Bagikan melalui


ControllerBase.BadRequest Metode

Definisi

Overload

BadRequest()

Membuat BadRequestResult yang menghasilkan respons Status400BadRequest.

BadRequest(ModelStateDictionary)

Membuat BadRequestObjectResult yang menghasilkan respons Status400BadRequest.

BadRequest(Object)

Membuat BadRequestObjectResult yang menghasilkan respons Status400BadRequest.

BadRequest()

Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs

Membuat BadRequestResult yang menghasilkan respons 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

Mengembalikan

BadRequestResult yang dibuat untuk respons.

Atribut

Berlaku untuk

BadRequest(ModelStateDictionary)

Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs

Membuat BadRequestObjectResult yang menghasilkan respons 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

Parameter

modelState
ModelStateDictionary

ModelStateDictionary berisi kesalahan yang akan dikembalikan ke klien.

Mengembalikan

BadRequestObjectResult yang dibuat untuk respons.

Atribut

Berlaku untuk

BadRequest(Object)

Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs

Membuat BadRequestObjectResult yang menghasilkan respons 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

Parameter

error
Object

Objek kesalahan yang akan dikembalikan ke klien.

Mengembalikan

BadRequestObjectResult yang dibuat untuk respons.

Atribut

Berlaku untuk