ControllerBase.Ok ControllerBase.Ok ControllerBase.Ok Method

Definition

Overloads

Ok() Ok() Ok()

Creates a OkResult object that produces an empty Status200OK response.

Ok(Object) Ok(Object) Ok(Object)

Creates an OkObjectResult object that produces an Status200OK response.

Ok() Ok() Ok()

Creates a OkResult object that produces an empty Status200OK response.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.OkResult Ok ();
abstract member Ok : unit -> Microsoft.AspNetCore.Mvc.OkResult
override this.Ok : unit -> Microsoft.AspNetCore.Mvc.OkResult
Public Overridable Function Ok () As OkResult
Returns

The created OkResult for the response.

Ok(Object) Ok(Object) Ok(Object)

Creates an OkObjectResult object that produces an Status200OK response.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.OkObjectResult Ok (object value);
abstract member Ok : obj -> Microsoft.AspNetCore.Mvc.OkObjectResult
override this.Ok : obj -> Microsoft.AspNetCore.Mvc.OkObjectResult
Public Overridable Function Ok (value As Object) As OkObjectResult
Parameters
value
Object Object Object

The content value to format in the entity body.

Returns

Applies to