Share via


ODataController.Created<TEntity> Method (TEntity)

Creates an action result with the specified values that is a response to a POST operation with an entity to an entity set.

Namespace:  System.Web.Http.OData
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Syntax

'Declaration
Protected Overridable Function Created(Of TEntity) ( _
    entity As TEntity _
) As CreatedODataResult(Of TEntity)
'Usage
Dim entity As TEntity
Dim returnValue As CreatedODataResult(Of TEntity)

returnValue = Me.Created(entity)
protected virtual CreatedODataResult<TEntity> Created<TEntity>(
    TEntity entity
)
protected:
generic<typename TEntity>
virtual CreatedODataResult<TEntity>^ Created(
    TEntity entity
)
abstract Created : 
        entity:'TEntity -> CreatedODataResult<'TEntity> 
override Created : 
        entity:'TEntity -> CreatedODataResult<'TEntity> 
JScript does not support generic types and methods.

Type Parameters

  • TEntity
    The created entity type.

Parameters

  • entity
    Type: TEntity
    The created entity.

Return Value

Type: System.Web.Http.OData.Results.CreatedODataResult<TEntity>
A CreatedODataResult<T> with the specified values.

See Also

Reference

ODataController Class

Created Overload

System.Web.Http.OData Namespace