ControllerBase.Ok Method

Definition

Overloads

Ok()

Creates a OkResult object that produces an empty Status200OK response.

Ok(Object)

Creates an OkObjectResult object that produces an Status200OK response.

Ok()

Creates a OkResult object that produces an empty Status200OK response.

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

Returns

OkResult

The created OkResult for the response.

Attributes

Applies to

Ok(Object)

Creates an OkObjectResult object that produces an Status200OK response.

public:
 virtual Microsoft::AspNetCore::Mvc::OkObjectResult ^ Ok(System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.OkObjectResult Ok (object value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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

The content value to format in the entity body.

Returns

OkObjectResult

The created OkObjectResult for the response.

Attributes

Applies to