Share via


DataServiceContext.DeleteObject Method

Definition

Overloads

DeleteObject(Object)

Changes the state of the specified object to be deleted in the DataServiceContext.

DeleteObject(Object, Object[])

Changes the state of the specified object to be deleted in the DataServiceContext.

DeleteObject(Object)

Changes the state of the specified object to be deleted in the DataServiceContext.

public virtual void DeleteObject (object entity);
abstract member DeleteObject : obj -> unit
override this.DeleteObject : obj -> unit
Public Overridable Sub DeleteObject (entity As Object)

Parameters

entity
Object

The tracked entity to be changed to the deleted state.

Exceptions

When entity is null.

When the object is not being tracked by the DataServiceContext.

Remarks

Existing objects in the Added state become detached.

Applies to

DeleteObject(Object, Object[])

Changes the state of the specified object to be deleted in the DataServiceContext.

public virtual void DeleteObject (object entity, params object[] dependsOnObjects);
abstract member DeleteObject : obj * obj[] -> unit
override this.DeleteObject : obj * obj[] -> unit
Public Overridable Sub DeleteObject (entity As Object, ParamArray dependsOnObjects As Object())

Parameters

entity
Object

The tracked entity to be changed to the deleted state.

dependsOnObjects
Object[]

DependsOnObjects for the deleted entity.

Exceptions

When entity is null.

When the object is not being tracked by the DataServiceContext.

Remarks

Existing objects in the Added state become detached.

Applies to