Batch Operations
Batch operation interfaces allow processing multiple data records in a single request to improve efficiency.
Batch Delete
Delete multiple entities at once.
- URL:
/api/app/{entity-name}/batch-delete - Method:
POST - Request Body: List of IDs.
[
"3a054944-59c2-4809-b103-018f3a2c5a21",
"3a054944-59c2-4809-b103-018f3a2c5a22"
]
Batch Update/Enable/Disable
Depending on business requirements, batch status update interfaces may be provided.
- URL:
/api/app/{entity-name}/batch-update-status - Method:
POST - Request Body:
{
"ids": ["...", "..."],
"status": "Active"
}
Implementation Logic
Batch operations are typically implemented using the Repository.DeleteManyAsync or UpdateManyAsync methods provided by the domain service or repository to ensure transaction consistency.