Skip to content

Feature: Support deleting an array of entity objects or primary keys via DeleteAll. #353

@mikependon

Description

@mikependon

An adhoc observation, it could be nice to do deletion of the IEnumerable<TEntity> objects.

Implementation:

connection.DeleteAll<TEntity>(IEnumerable<TEntity> entities, ...);
connection.DeleteAll<TEntity>(IEnumerable<object> entitiesOrPrimaryKeys, ...);
connection.DeleteAll("TableName", IEnumerable<object> entitiesOrPrimaryKeys, ...);

Calls:

var entities = connection.Query<Customer>(e => e.IsDisabled == true);
...
connection.DeleteAll(entities);

Or via primary keys:

connection.DeleteAll(new [] { 10045, 25661, ... });

Acceptance Criteria:

Metadata

Metadata

Assignees

Labels

featureDefined as a big development item (feature)fixedThe bug, issue, incident has been fixed.for grabsA community can grab for contribution

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions