ControllerBase.Ok Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Ok() |
Creates an OkResult object that produces an empty Status200OK response. |
Ok(Object) |
Creates an OkObjectResult object that produces a Status200OK response. |
Ok()
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Creates an 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
The created OkResult for the response.
- Attributes
Applies to
Ok(Object)
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
- Source:
- ControllerBase.cs
Creates an OkObjectResult object that produces a 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]
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
The created OkObjectResult for the response.
- Attributes