Hi @James_Baibai,
Have you assessed the true need to allow your users to bulk delete? Once the records are deleted they are gone, the only way to retrieve the data is if auditing was enabled on all the fields or if you restore from a backup, which only retain up to 7 days for production databases. I find that it's much safer to deactivate records once they are no longer required. That said, if you want to allow Bulk Deletion, you should have a look at out of box Bulk Deletion jobs to see if it can meet your needs. If you don't need the records to be deleted in real time / near-real time, you could setup a bulk deletion job to run nightly to delete records based off criteria you define. In your example you could have the users set a certain status on the records and import those updates back into Dataverse, then your next bulk deletion run would delete those records based on the status. The benefit of this is that you don't have to grant those users delete permissions, reducing risk of inadvertent deletion, but still provide a controlled process to actually delete the records.
There is also the Bulk Data Updater for the Xrmtoolbox which allows you to bulk delete using views and FetchXml queries.
If you still prefer to write your own code to do deletion, you can refer to this reference on how to achieve this using the .NET SDK.
---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.