ControllerBase.StatusCode ControllerBase.StatusCode ControllerBase.StatusCode Method

Definition

Overloads

StatusCode(Int32, Object) StatusCode(Int32, Object) StatusCode(Int32, Object)

Creates a ObjectResult object by specifying a statusCode and value

StatusCode(Int32) StatusCode(Int32) StatusCode(Int32)

Creates a StatusCodeResult object by specifying a statusCode.

StatusCode(Int32, Object) StatusCode(Int32, Object) StatusCode(Int32, Object)

Creates a ObjectResult object by specifying a statusCode and value

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode (int statusCode, object value);
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

Parameters

statusCode
Int32 Int32 Int32

The status code to set on the response.

value
Object Object Object

The value to set on the ObjectResult.

Returns

The created ObjectResult object for the response.

StatusCode(Int32) StatusCode(Int32) StatusCode(Int32)

Creates a StatusCodeResult object by specifying a statusCode.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode (int statusCode);
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

Parameters

statusCode
Int32 Int32 Int32

The status code to set on the response.

Returns

Applies to