ApiController::CreatedAtRoute Method

 

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

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

public protected:
generic<typename T>
virtual CreatedAtRouteNegotiatedContentResult<T>^ CreatedAtRoute(
	String^ routeName,
	IDictionary<String^, Object^>^ routeValues,
	T content
)

Parameters

routeName
Type: System::String^

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

routeValues
Type: System.Collections.Generic::IDictionary<String^, Object^>^

The route data to use for generating the URL.

content
Type: T

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

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.

public protected:
generic<typename T>
CreatedAtRouteNegotiatedContentResult<T>^ CreatedAtRoute(
	String^ routeName,
	Object^ routeValues,
	T content
)

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.

Type Parameters

T

The type of content in the entity body.

Return to top
Show: