Dela via


ApiController.Ok Method

Definition

Overloads

Ok()

Creates an OkResult (200 OK).

Ok<T>(T)

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

Ok()

Source:
ApiController.cs
Source:
ApiController.cs

Creates an OkResult (200 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

An OkResult.

Attributes

Applies to

Ok<T>(T)

Source:
ApiController.cs
Source:
ApiController.cs

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

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.OkObjectResult Ok<T> (T content);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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
T

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

Returns

An OkObjectResult with the specified values.

Attributes

Applies to