Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This method should be overridden to create a new entity in the entity set.
Namespace: System.Web.Http.OData
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Syntax
protected internal virtual TEntity CreateEntity(
TEntity entity
)
public protected:
virtual TEntity CreateEntity(
TEntity entity
)
abstract CreateEntity :
entity:'TEntity -> 'TEntity
override CreateEntity :
entity:'TEntity -> 'TEntity
Protected Friend Overridable Function CreateEntity (
entity As TEntity
) As TEntity
Parameters
entity
Type: TEntityThe entity to add to the entity set.
Return Value
Type: TEntity
The created entity.
Remarks
When overriding this method, the GetKey method should also be overridden so that the location header can be generated.
See Also
EntitySetController<TEntity, TKey> Class
System.Web.Http.OData Namespace
Return to top