ControllerBase.CreatedAtRoute 方法

定义

重载

CreatedAtRoute(String, Object, Object)

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

CreatedAtRoute(String, Object)

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

CreatedAtRoute(Object, Object)

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

CreatedAtRoute(String, Object, Object)

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

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

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

参数

routeName
String

用于生成 URL 的路由的名称。

routeValues
Object

用于生成 URL 的路由数据。

value
Object

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

返回

为响应创建的 CreatedAtRouteResult

属性

适用于

CreatedAtRoute(String, Object)

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

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

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

参数

routeName
String

用于生成 URL 的路由的名称。

value
Object

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

返回

为响应创建的 CreatedAtRouteResult

属性

适用于

CreatedAtRoute(Object, Object)

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

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

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

参数

routeValues
Object

用于生成 URL 的路由数据。

value
Object

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

返回

为响应创建的 CreatedAtRouteResult

属性

适用于