ApiController.Ok ApiController.Ok ApiController.Ok Method

Definition

Overloads

Ok() Ok() Ok()

Creates an OkResult (200 OK).

Ok<T>(T) Ok<T>(T) Ok<T>(T)

Creates an OkObjectResult (200 OK) with the specified values.

Ok() Ok() Ok()

Creates an OkResult (200 OK).

[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

Ok<T>(T) Ok<T>(T) Ok<T>(T)

Creates an OkObjectResult (200 OK) with the specified values.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.OkObjectResult Ok<T> (T content);
abstract member Ok : 'T -> Microsoft.AspNetCore.Mvc.OkObjectResult
override this.Ok : 'T -> Microsoft.AspNetCore.Mvc.OkObjectResult
Public Overridable Function Ok(Of T) (content As T) As OkObjectResult

Type Parameters

T

The type of content in the entity body.

Parameters

content

The content value to negotiate and format in the entity body.

Returns

Applies to