Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IDataServiceStreamProvider.DeleteStream Method

Deletes the associated media resource when a media link entry is deleted.

Namespace:  System.Data.Services.Providers
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

void DeleteStream(
	Object entity,
	DataServiceOperationContext operationContext


Type: System.Object
The media link entry that is deleted.
Type: System.Data.Services.DataServiceOperationContext
The DataServiceOperationContext instance that processes the request.


When entity or operationContext are null.


When entity is not an entity that has a binary property to stream.


When the stream associated with the entity cannot be deleted.

This method is invoked by the data services framework whenever an delete operation is being processed for the streams associated with the entity instance specified via the entity parameter. Notes to Interface Implementers If this method is being invoked as part of a request to delete the MLE and its associated stream (ie. MR): This method will be invoked AFTER IUpdatable.DeleteResource(entity) is called. An implementer of this method must be able to delete a stream even if the associated entity (passed as a parameter to this method) has already been removed from the underlying data source. The operationContext argument is passed as a means for this method to read the HTTP request headers provided with the delete request. An implementer of this method MUST NOT set the following HTTP response headers on the operationContext parameter as they are set by the data service runtime: Content-Type ETag An implementer of this method may set HTTP response headers (other than those forbidden above) on the operationContext parameter. An implementer of this method should only set the properties on the operationContext parameter which it requires to be set for a successful response. Altering other properties on the operationContext parameter may corrupt the response from the data service.

© 2015 Microsoft