Dela via


ApiController.CreatedAtRoute(String, Object, Object) Method

Definition

Creates a CreatedAtRouteResult (201 Created) with the specified values.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute (string routeName, object routeValues, object content);
[<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, content As Object) As CreatedAtRouteResult

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.

content
Object

The content value to format in the entity body.

Returns

A CreatedAtRouteResult with the specified values.

Attributes

Applies to