Results.CreatedAtRoute 方法

定义

重载

CreatedAtRoute(String, RouteValueDictionary, Object)

生成 Status201Created 响应。

CreatedAtRoute(String, Object, Object)

生成 Status201Created 响应。

CreatedAtRoute<TValue>(String, RouteValueDictionary, TValue)

生成 Status201Created 响应。

CreatedAtRoute<TValue>(String, Object, TValue)

生成 Status201Created 响应。

CreatedAtRoute(String, RouteValueDictionary, Object)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult CreatedAtRoute (string? routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary? routeValues, object? value = default);
static member CreatedAtRoute : string * Microsoft.AspNetCore.Routing.RouteValueDictionary * obj -> Microsoft.AspNetCore.Http.IResult
Public Shared Function CreatedAtRoute (routeName As String, routeValues As RouteValueDictionary, Optional value As Object = Nothing) As IResult

参数

routeName
String

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

routeValues
RouteValueDictionary

用于生成 URL 的路由数据。

value
Object

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于

CreatedAtRoute(String, Object, Object)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult CreatedAtRoute (string? routeName = default, object? routeValues = default, object? value = default);
static member CreatedAtRoute : string * obj * obj -> Microsoft.AspNetCore.Http.IResult
Public Shared Function CreatedAtRoute (Optional routeName As String = Nothing, Optional routeValues As Object = Nothing, Optional value As Object = Nothing) As IResult

参数

routeName
String

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

routeValues
Object

用于生成 URL 的路由数据。

value
Object

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于

CreatedAtRoute<TValue>(String, RouteValueDictionary, TValue)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult CreatedAtRoute<TValue> (string? routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary? routeValues, TValue? value = default);
static member CreatedAtRoute : string * Microsoft.AspNetCore.Routing.RouteValueDictionary * 'Value -> Microsoft.AspNetCore.Http.IResult
Public Shared Function CreatedAtRoute(Of TValue) (routeName As String, routeValues As RouteValueDictionary, Optional value As TValue = Nothing) As IResult

类型参数

TValue

参数

routeName
String

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

routeValues
RouteValueDictionary

用于生成 URL 的路由数据。

value
TValue

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于

CreatedAtRoute<TValue>(String, Object, TValue)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult CreatedAtRoute<TValue> (string? routeName = default, object? routeValues = default, TValue? value = default);
static member CreatedAtRoute : string * obj * 'Value -> Microsoft.AspNetCore.Http.IResult
Public Shared Function CreatedAtRoute(Of TValue) (Optional routeName As String = Nothing, Optional routeValues As Object = Nothing, Optional value As TValue = Nothing) As IResult

类型参数

TValue

参数

routeName
String

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

routeValues
Object

用于生成 URL 的路由数据。

value
TValue

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于