CreatedAtRouteResult Class¶
Summary¶
An [Microsoft.AspNet.Mvc.ActionResult]() that returns a Created (201) response with a Location header.
Constructors¶
-
CreatedAtRouteResult
(System.Object, System.Object)¶ Initializes a new instance of the [Microsoft.AspNet.Mvc.CreatedAtRouteResult](Microsoft.AspNet.Mvc.CreatedAtRouteResult.yml) class with the values provided.
Arguments: - routeValues (System.Object) – The route data to use for generating the URL.
- value (System.Object) – The value to format in the entity body.
public CreatedAtRouteResult(object routeValues, object value)
-
CreatedAtRouteResult
(System.String, System.Object, System.Object) Initializes a new instance of the [Microsoft.AspNet.Mvc.CreatedAtRouteResult](Microsoft.AspNet.Mvc.CreatedAtRouteResult.yml) class with the values provided.
Arguments: - routeName (System.String) – The name of the route to use for generating the URL.
- routeValues (System.Object) – The route data to use for generating the URL.
- value (System.Object) – The value to format in the entity body.
public CreatedAtRouteResult(string routeName, object routeValues, object value)
-
Properties¶
-
RouteName
()¶ Gets or sets the name of the route to use for generating the URL.
Return type: System.String public string RouteName { get; set; }
-
RouteValues
()¶ Gets or sets the route data to use for generating the URL.
Return type: System.Collections.Generic.IDictionary{System.String,System.Object} public IDictionary<string, object> RouteValues { get; set; }
-
UrlHelper
()¶ Gets or sets the [Microsoft.AspNet.Mvc.IUrlHelper]() used to generate URLs.
Return type: Microsoft.AspNet.Mvc.IUrlHelper public IUrlHelper UrlHelper { get; set; }
-
Methods¶
-
OnFormatting
(Microsoft.AspNet.Mvc.ActionContext)¶ Arguments: - context (Microsoft.AspNet.Mvc.ActionContext) –
protected override void OnFormatting(ActionContext context)
-