Udostępnij za pośrednictwem


ApiController.CreatedAtRoute Method

 

Namespace:   System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

Overload List

Name Description
System_CAPS_protmethod CreatedAtRoute<T>(String, IDictionary<String, Object>, T)

Creates a CreatedAtRouteNegotiatedContentResult<T> (201 Created) with the specified values.

System_CAPS_protmethod CreatedAtRoute<T>(String, Object, T)

Creates a CreatedAtRouteNegotiatedContentResult<T> (201 Created) with the specified values.

See Also

ApiController Class
System.Web.Http Namespace

Return to top

ApiController.CreatedAtRoute<T> Method (String, IDictionary<String, Object>, T)

Creates a CreatedAtRouteNegotiatedContentResult<T> (201 Created) with the specified values.

Syntax

protected internal virtual CreatedAtRouteNegotiatedContentResult<T> CreatedAtRoute<T>(
    string routeName,
    IDictionary<string, object> routeValues,
    T content
)
public protected:
generic<typename T>
virtual CreatedAtRouteNegotiatedContentResult<T>^ CreatedAtRoute(
    String^ routeName,
    IDictionary<String^, Object^>^ routeValues,
    T content
)
abstract CreatedAtRoute<'T> : 
        routeName:string *
        routeValues:IDictionary<string, Object> *
        content:'T -> CreatedAtRouteNegotiatedContentResult<'T>
override CreatedAtRoute<'T> : 
        routeName:string *
        routeValues:IDictionary<string, Object> *
        content:'T -> CreatedAtRouteNegotiatedContentResult<'T>
Protected Friend Overridable Function CreatedAtRoute(Of T) (
    routeName As String,
    routeValues As IDictionary(Of String, Object),
    content As T
) As CreatedAtRouteNegotiatedContentResult(Of T)

Parameters

  • routeName
    Type: System.String

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

  • content
    Type: T

    The content value to negotiate and format in the entity body.

Return Value

Type: System.Web.Http.Results.CreatedAtRouteNegotiatedContentResult<T>

A CreatedAtRouteNegotiatedContentResult<T> with the specified values.

Type Parameters

  • T
    The type of content in the entity body.

Return to top

ApiController.CreatedAtRoute<T> Method (String, Object, T)

Creates a CreatedAtRouteNegotiatedContentResult<T> (201 Created) with the specified values.

Syntax

protected internal CreatedAtRouteNegotiatedContentResult<T> CreatedAtRoute<T>(
    string routeName,
    object routeValues,
    T content
)
public protected:
generic<typename T>
CreatedAtRouteNegotiatedContentResult<T>^ CreatedAtRoute(
    String^ routeName,
    Object^ routeValues,
    T content
)
member CreatedAtRoute<'T> : 
        routeName:string *
        routeValues:Object *
        content:'T -> CreatedAtRouteNegotiatedContentResult<'T>
Protected Friend Function CreatedAtRoute(Of T) (
    routeName As String,
    routeValues As Object,
    content As T
) As CreatedAtRouteNegotiatedContentResult(Of T)

Parameters

  • routeName
    Type: System.String

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

  • routeValues
    Type: System.Object

    The route data to use for generating the URL.

  • content
    Type: T

    The content value to negotiate and format in the entity body.

Return Value

Type: System.Web.Http.Results.CreatedAtRouteNegotiatedContentResult<T>

A CreatedAtRouteNegotiatedContentResult<T> with the specified values.

Type Parameters

  • T
    The type of content in the entity body.

Return to top