CreatedResult Class

Summary

An [Microsoft.AspNet.Mvc.ActionResult]() that returns a Created (201) response with a Location header.

Syntax

public class CreatedResult : ObjectResult, IActionResult

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.CreatedResult

Constructors

CreatedResult(System.String, System.Object)

Initializes a new instance of the [Microsoft.AspNet.Mvc.CreatedResult](Microsoft.AspNet.Mvc.CreatedResult.yml) class with the values provided.

Arguments:
  • location (System.String) – The location at which the content has been created.
  • value (System.Object) – The value to format in the entity body.
public CreatedResult(string location, object value)

Properties

Location()

Gets or sets the location at which the content has been created.

Return type:System.String
public string Location { get; set; }

Methods

OnFormatting(Microsoft.AspNet.Mvc.ActionContext)
Arguments:
protected override void OnFormatting(ActionContext context)