Table of Contents

Class UpdatedODataResult<T>

Namespace
System.Web.Http.OData.Results
Assembly
System.Web.Http.OData.dll

Represents an action result that is a response to a PUT, PATCH, or a MERGE operation on an OData entity.

public class UpdatedODataResult<T> : IHttpActionResult

Type Parameters

T

The entity type.

Inheritance
UpdatedODataResult<T>
Implements
IHttpActionResult
Inherited Members

Constructors

UpdatedODataResult(T, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)

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

public UpdatedODataResult(T entity, IContentNegotiator contentNegotiator, HttpRequestMessage request, IEnumerable<MediaTypeFormatter> formatters)

Parameters

entity T

The updated entity.

contentNegotiator IContentNegotiator

The content negotiator to handle content negotiation.

request HttpRequestMessage

The request message which led to this result.

formatters IEnumerable<MediaTypeFormatter>

The formatters to use to negotiate and format the content.

UpdatedODataResult(T, ApiController)

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

public UpdatedODataResult(T entity, ApiController controller)

Parameters

entity T

The updated entity.

controller ApiController

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

Properties

ContentNegotiator

Gets the content negotiator to handle content negotiation.

public IContentNegotiator ContentNegotiator { get; }

Property Value

IContentNegotiator

Entity

Gets the entity that was updated.

public T Entity { get; }

Property Value

T

Formatters

Gets the formatters to use to negotiate and format the content.

public IEnumerable<MediaTypeFormatter> Formatters { get; }

Property Value

IEnumerable<MediaTypeFormatter>

Request

Gets the request message which led to this result.

public HttpRequestMessage Request { get; }

Property Value

HttpRequestMessage

Methods

ExecuteAsync(CancellationToken)

public virtual Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task<HttpResponseMessage>