Results.CreatedAtRoute Method

Definition

Overloads

CreatedAtRoute(String, RouteValueDictionary, Object)

Produces a Status201Created response.

CreatedAtRoute(String, Object, Object)

Produces a Status201Created response.

CreatedAtRoute<TValue>(String, RouteValueDictionary, TValue)

Produces a Status201Created response.

CreatedAtRoute<TValue>(String, Object, TValue)

Produces a Status201Created response.

CreatedAtRoute(String, RouteValueDictionary, Object)

Produces a Status201Created response.

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

Parameters

routeName
String

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

routeValues
RouteValueDictionary

The route data to use for generating the URL.

value
Object

The value to be included in the HTTP response body.

Returns

The created IResult for the response.

Applies to

CreatedAtRoute(String, Object, Object)

Produces a Status201Created response.

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

Parameters

routeName
String

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

routeValues
Object

The route data to use for generating the URL.

value
Object

The value to be included in the HTTP response body.

Returns

The created IResult for the response.

Applies to

CreatedAtRoute<TValue>(String, RouteValueDictionary, TValue)

Produces a Status201Created response.

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

Type Parameters

TValue

Parameters

routeName
String

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

routeValues
RouteValueDictionary

The route data to use for generating the URL.

value
TValue

The value to be included in the HTTP response body.

Returns

The created IResult for the response.

Applies to

CreatedAtRoute<TValue>(String, Object, TValue)

Produces a Status201Created response.

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

Type Parameters

TValue

Parameters

routeName
String

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

routeValues
Object

The route data to use for generating the URL.

value
TValue

The value to be included in the HTTP response body.

Returns

The created IResult for the response.

Applies to