Results.CreatedAtRoute(String, Object, Object) Method

Definition

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

IResult

The created IResult for the response.

Applies to