Minimum Version: 2.5.0 / 3.5.0
Given the importance of the new buk operations, you don’t need to do anything special to start using them other than updating to the newer versions that support them.
When you setup crud operations in the middleware configuration (by calling .AddCrud() and .UseCrud()) bulk operations will be added automatically.
Here’s a quick sample that demonstrates how to unit test that two records get created with create multiple.
You can find the source code here.
Here’s a another quick sample that demonstrates how to unit test that updates two records with update multiple.
With UpdateMultiple, records must exist, otherwise an exception will be thrown. You can use either their primary key or an alternate key.
You can find the source code here.
With UpsertMultiple you can both create and update records as part of the one operation. Here’s another example that demonstrates an UpsertMultiple request that creates one record and updates another.
You can find the source code here.