ControllerBase.CreatedAtAction 方法

定义

重载

CreatedAtAction(String, Object)

创建一个 CreatedAtActionResult 生成响应的对象 Status201Created

CreatedAtAction(String, Object, Object)

创建一个 CreatedAtActionResult 生成响应的对象 Status201Created

CreatedAtAction(String, String, Object, Object)

创建一个 CreatedAtActionResult 生成响应的对象 Status201Created

CreatedAtAction(String, Object)

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

创建一个 CreatedAtActionResult 生成响应的对象 Status201Created

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

参数

actionName
String

用于生成 URL 的操作的名称。

value
Object

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

返回

为响应创建的 CreatedAtActionResult

属性

适用于

CreatedAtAction(String, Object, Object)

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

创建一个 CreatedAtActionResult 生成响应的对象 Status201Created

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

参数

actionName
String

用于生成 URL 的操作的名称。

routeValues
Object

用于生成 URL 的路由数据。

value
Object

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

返回

为响应创建的 CreatedAtActionResult

属性

适用于

CreatedAtAction(String, String, Object, Object)

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

创建一个 CreatedAtActionResult 生成响应的对象 Status201Created

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

参数

actionName
String

用于生成 URL 的操作的名称。

controllerName
String

用于生成 URL 的控制器的名称。

routeValues
Object

用于生成 URL 的路由数据。

value
Object

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

返回

为响应创建的 CreatedAtActionResult

属性

适用于