Bulk update and delete in .NET Entity Framework Core 7

preview_player
Показать описание
Authorised Territory code examples - This .NET Entity Framework Core 7 C# #tutorial shows how to use ExecuteDelete and ExecuteUpdate to achieve bulk update/delete.
First, we create entity for our existing table as well as database context.
The table is populated via SQL script.
Next, we use ExecuteDelete and ExecuteUpdate commands to update and delete rows. Filtering is used too to remove specific rows.
Finally, we add new entity and use Cascade Delete to remove a row and all other rows referenced by a foreign key.
Рекомендации по теме