ControllerBase.Ok 方法

定义

重载

Ok()

创建生成空 Status200OK 响应的 OkResult 对象。

Ok(Object)

创建生成 Status200OK 响应的 OkObjectResult 对象。

Ok()

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

创建生成空 Status200OK 响应的 OkResult 对象。

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

返回

为响应创建的 OkResult

属性

适用于

Ok(Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

创建生成 Status200OK 响应的 OkObjectResult 对象。

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]
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

参数

value
Object

要在实体正文中设置格式的内容值。

返回

为响应创建的 OkObjectResult

属性

适用于