/// <summary> /// Handles PUT requests that attempt to replace a single entity in the entity set. /// </summary> /// <param name="key">The entity key of the entity to replace.</param> /// <param name="update">The updated entity.</param> /// <returns>A <see cref="Task"/> that contains the response message to send back to the client when it completes.</returns> public virtual async Task <HttpResponseMessage> Put([FromODataUri] TKey key, [FromBody] TEntity update) { TEntity updatedEntity = await UpdateEntityAsync(key, update); return(EntitySetControllerHelpers.PutResponse <TEntity>(Request, updatedEntity)); }
/// <summary> /// Handles PUT requests that attempt to replace a single entity in the entity set. /// </summary> /// <param name="key">The entity key of the entity to replace.</param> /// <param name="update">The updated entity.</param> /// <returns>The response message to send back to the client.</returns> public virtual HttpResponseMessage Put([FromODataUri] TKey key, [FromBody] TEntity update) { TEntity updatedEntity = UpdateEntity(key, update); return(EntitySetControllerHelpers.PutResponse(Request, updatedEntity)); }