TypedResults.CreatedAtRoute Method

Definition

Overloads

CreatedAtRoute(String, RouteValueDictionary)

Produces a Status201Created response.

CreatedAtRoute(String, Object)

Produces a Status201Created response.

CreatedAtRoute<TValue>(TValue, String, RouteValueDictionary)

Produces a Status201Created response.

CreatedAtRoute<TValue>(TValue, String, Object)

Produces a Status201Created response.

CreatedAtRoute(String, RouteValueDictionary)

Produces a Status201Created response.

public static Microsoft.AspNetCore.Http.HttpResults.CreatedAtRoute CreatedAtRoute (string? routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary? routeValues);
static member CreatedAtRoute : string * Microsoft.AspNetCore.Routing.RouteValueDictionary -> Microsoft.AspNetCore.Http.HttpResults.CreatedAtRoute
Public Shared Function CreatedAtRoute (routeName As String, routeValues As RouteValueDictionary) As CreatedAtRoute

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.

Returns

The created CreatedAtRoute for the response.

Applies to

CreatedAtRoute(String, Object)

Produces a Status201Created response.

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

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.

Returns

The created CreatedAtRoute for the response.

Applies to

CreatedAtRoute<TValue>(TValue, String, RouteValueDictionary)

Produces a Status201Created response.

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

Type Parameters

TValue

The type of object that will be JSON serialized to the response body.

Parameters

value
TValue

The value to be included in the HTTP response body.

routeName
String

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

routeValues
RouteValueDictionary

The route data to use for generating the URL.

Returns

The created CreatedAtRoute<TValue> for the response.

Applies to

CreatedAtRoute<TValue>(TValue, String, Object)

Produces a Status201Created response.

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

Type Parameters

TValue

The type of object that will be JSON serialized to the response body.

Parameters

value
TValue

The value to be included in the HTTP response body.

routeName
String

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

routeValues
Object

The route data to use for generating the URL.

Returns

The created CreatedAtRoute<TValue> for the response.

Applies to