Compartir a través de


ControllerBase.StatusCode Método

Definición

Sobrecargas

StatusCode(Int32)

Crea un objeto StatusCodeResult especificando un statusCode.

StatusCode(Int32, Object)

Crea un objeto ObjectResult especificando un statusCode y un value

StatusCode(Int32)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Crea un objeto StatusCodeResult especificando un statusCode.

public:
 virtual Microsoft::AspNetCore::Mvc::StatusCodeResult ^ StatusCode(int statusCode);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode (int statusCode);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
override this.StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
Public Overridable Function StatusCode (statusCode As Integer) As StatusCodeResult

Parámetros

statusCode
Int32

Código de estado que se va a establecer en la respuesta.

Devoluciones

Objeto StatusCodeResult creado para la respuesta.

Atributos

Se aplica a

StatusCode(Int32, Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

Crea un objeto ObjectResult especificando un statusCode y un value

public:
 virtual Microsoft::AspNetCore::Mvc::ObjectResult ^ StatusCode(int statusCode, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode (int statusCode, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode (int statusCode, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
override this.StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
Public Overridable Function StatusCode (statusCode As Integer, value As Object) As ObjectResult

Parámetros

statusCode
Int32

Código de estado que se va a establecer en la respuesta.

value
Object

Valor que se va a establecer en el ObjectResult.

Devoluciones

Objeto ObjectResult creado para la respuesta.

Atributos

Se aplica a