CreatedAtActionResult Class¶
Summary¶
An [Microsoft.AspNet.Mvc.ActionResult]() that returns a Created (201) response with a Location header.
Constructors¶
-
CreatedAtActionResult
(System.String, System.String, System.Object, System.Object)¶ Initializes a new instance of the [Microsoft.AspNet.Mvc.CreatedAtActionResult](Microsoft.AspNet.Mvc.CreatedAtActionResult.yml) with the values provided.
Arguments: - actionName (System.String) – The name of the action to use for generating the URL.
- controllerName (System.String) – The name of the controller 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 CreatedAtActionResult(string actionName, string controllerName, object routeValues, object value)
-
Properties¶
-
ActionName
()¶ Gets or sets the name of the action to use for generating the URL.
Return type: System.String public string ActionName { get; set; }
-
ControllerName
()¶ Gets or sets the name of the controller to use for generating the URL.
Return type: System.String public string ControllerName { 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)
-