Share via


CreatedODataResult<T> Constructors

Definition

Overloads

CreatedODataResult<T>(T)

Initializes a new instance of the CreatedODataResult<T> class.

CreatedODataResult<T>(T, ApiController)

Initializes a new instance of the CreatedODataResult<T> class.

CreatedODataResult<T>(T, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>, Uri)

Initializes a new instance of the CreatedODataResult<T> class.

CreatedODataResult<T>(T)

Initializes a new instance of the CreatedODataResult<T> class.

public CreatedODataResult (T entity);
new Microsoft.AspNet.OData.Results.CreatedODataResult<'T> : 'T -> Microsoft.AspNet.OData.Results.CreatedODataResult<'T>
Public Sub New (entity As T)

Parameters

entity
T

The created entity.

Applies to

CreatedODataResult<T>(T, ApiController)

Initializes a new instance of the CreatedODataResult<T> class.

public CreatedODataResult (T entity, System.Web.Http.ApiController controller);
new Microsoft.AspNet.OData.Results.CreatedODataResult<'T> : 'T * System.Web.Http.ApiController -> Microsoft.AspNet.OData.Results.CreatedODataResult<'T>
Public Sub New (entity As T, controller As ApiController)

Parameters

entity
T

The created entity.

controller
ApiController

The controller from which to obtain the dependencies needed for execution.

Applies to

CreatedODataResult<T>(T, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>, Uri)

Initializes a new instance of the CreatedODataResult<T> class.

public CreatedODataResult (T entity, System.Net.Http.Formatting.IContentNegotiator contentNegotiator, System.Net.Http.HttpRequestMessage request, System.Collections.Generic.IEnumerable<System.Net.Http.Formatting.MediaTypeFormatter> formatters, Uri locationHeader);
new Microsoft.AspNet.OData.Results.CreatedODataResult<'T> : 'T * System.Net.Http.Formatting.IContentNegotiator * System.Net.Http.HttpRequestMessage * seq<System.Net.Http.Formatting.MediaTypeFormatter> * Uri -> Microsoft.AspNet.OData.Results.CreatedODataResult<'T>
Public Sub New (entity As T, contentNegotiator As IContentNegotiator, request As HttpRequestMessage, formatters As IEnumerable(Of MediaTypeFormatter), locationHeader As Uri)

Parameters

entity
T

The created entity.

contentNegotiator
IContentNegotiator

The content negotiator to handle content negotiation.

request
HttpRequestMessage

The request message which led to this result.

formatters
IEnumerable<System.Net.Http.Formatting.MediaTypeFormatter>

The formatters to use to negotiate and format the content.

locationHeader
Uri

The location header for the created entity.

Applies to