ControllerBase.CreatedAtAction Method

Definition

Overloads

CreatedAtAction(String, Object)

Creates a CreatedAtActionResult object that produces a Status201Created response.

CreatedAtAction(String, Object, Object)

Creates a CreatedAtActionResult object that produces a Status201Created response.

CreatedAtAction(String, String, Object, Object)

Creates a CreatedAtActionResult object that produces a Status201Created response.

CreatedAtAction(String, Object)

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

Creates a CreatedAtActionResult object that produces a Status201Created response.

public:
 virtual Microsoft::AspNetCore::Mvc::CreatedAtActionResult ^ CreatedAtAction(System::String ^ actionName, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction (string actionName, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction (string? actionName, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member CreatedAtAction : string * obj -> Microsoft.AspNetCore.Mvc.CreatedAtActionResult
override this.CreatedAtAction : string * obj -> Microsoft.AspNetCore.Mvc.CreatedAtActionResult
Public Overridable Function CreatedAtAction (actionName As String, value As Object) As CreatedAtActionResult

Parameters

actionName
String

The name of the action to use for generating the URL.

value
Object

The content value to format in the entity body.

Returns

The created CreatedAtActionResult for the response.

Attributes

Applies to

CreatedAtAction(String, Object, Object)

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

Creates a CreatedAtActionResult object that produces a Status201Created response.

public:
 virtual Microsoft::AspNetCore::Mvc::CreatedAtActionResult ^ CreatedAtAction(System::String ^ actionName, System::Object ^ routeValues, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction (string actionName, object routeValues, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction (string? actionName, object? routeValues, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member CreatedAtAction : string * obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtActionResult
override this.CreatedAtAction : string * obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtActionResult
Public Overridable Function CreatedAtAction (actionName As String, routeValues As Object, value As Object) As CreatedAtActionResult

Parameters

actionName
String

The name of the action to use for generating the URL.

routeValues
Object

The route data to use for generating the URL.

value
Object

The content value to format in the entity body.

Returns

The created CreatedAtActionResult for the response.

Attributes

Applies to

CreatedAtAction(String, String, Object, Object)

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

Creates a CreatedAtActionResult object that produces a Status201Created response.

public:
 virtual Microsoft::AspNetCore::Mvc::CreatedAtActionResult ^ CreatedAtAction(System::String ^ actionName, System::String ^ controllerName, System::Object ^ routeValues, System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction (string actionName, string controllerName, object routeValues, object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction (string? actionName, string? controllerName, object? routeValues, object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member CreatedAtAction : string * string * obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtActionResult
override this.CreatedAtAction : string * string * obj * obj -> Microsoft.AspNetCore.Mvc.CreatedAtActionResult
Public Overridable Function CreatedAtAction (actionName As String, controllerName As String, routeValues As Object, value As Object) As CreatedAtActionResult

Parameters

actionName
String

The name of the action to use for generating the URL.

controllerName
String

The name of the controller to use for generating the URL.

routeValues
Object

The route data to use for generating the URL.

value
Object

The content value to format in the entity body.

Returns

The created CreatedAtActionResult for the response.

Attributes

Applies to