Deletes all entities of the given type EntityType that meet the given criteria.

Namespace: Aspectize.Core
Assembly: AspectizeDAL (in AspectizeDAL.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
void DeleteEntities<EntityType>(
	QueryCriteria criteria
)
where EntityType : new(), Entity, IEntity, IDataWrapper
Visual Basic
Sub DeleteEntities(Of EntityType As {New, Entity, IEntity, IDataWrapper}) ( _
	criteria As QueryCriteria _
)

Parameters

criteria
Type: Aspectize.Core..::..QueryCriteria
The critiria to meet.

Type Parameters

EntityType
Entity Type to delete

Examples

CopyC#
QueryCriteria criteria = new QueryCriteria(AdventureWorks.Production.Product.Fields.Color, ComparisonOperator.Equal, "NewColor");

dm.DeleteEntities<AdventureWorks.Production.Product>(criteria);
CopyVB.NET
Dim criteria As QueryCriteria = New QueryCriteria(AdventureWorks.Production.Product.Fields.Color, ComparisonOperator.Equal, "NewColor")

dm.DeleteEntities(Of AdventureWorks.Production.Product)(criteria)

See Also