Deletes the given TData instance permently from the C1 storage. This method triggers the event OnDeleted for the item item

Namespace: Composite.Data
Assembly: Composite (in Composite.dll) Version: 5.3.6135.33083

Syntax

C#
public void Delete<TData>(
	TData item
)
where TData : class, IData
Visual Basic
Public Sub Delete(Of TData As {Class, IData}) ( _
	item As TData _
)
Visual C++
public:
generic<typename TData>
where TData : ref class, IData
void Delete(
	TData item
)

Parameters

item
Type: TData
The item to delete

Type Parameters

TData
An IData interface

Examples

CopyC#
using (DataConnection connection = new DataConnection())
{
   IMyDataType myDataType = 
      (from d in connection.Get<IMyDataType>()
       where d.Name == "Foo"
       select d).First();


   connection.Delete<IMyDataType>(myDataType);
}

See Also