ASP.Net Core Web API - Bulk Operations| Batch Processing | EFCore.BulkExtensions

Опубликовано: 15 Октябрь 2024
на канале: Sarrawy Dev
6,312
like

While being very efficient, Entity Framework (EF) & Entity Framework Core (EF Core) do not allow you to natively perform bulk operations, Hopefully, there is an open-source library that solves the problem It is known as EF Core Bulk extensions. This video shows how to use EF Core Bulk Extensions on a .Net project that relies on EF Core.


Steps:
Create a Web API template with the latest .Net Core installed in your machine
Package to Perform EF Core Bulk Operations (EFCore.BulkExtensions)
Create a model and DbContext where we can perform the table creation in the SQL Database with
the configuration setup.
Set up the connection string in the appsettings.json file
Create a Class named as EmployeeService in which we can add all the Methods to perform the
CRUD Operations using the EF Core and Bulk Operations and added a loop to perform (100k
records) for bulk insert and bulk update and along with Bulk delete.
Let's create an individual endpoint for all the respective service methods inside the controller class.
Test the API to check how much time is consumed to complete the operation. It hardly takes ? Sec
to insert all the 100k records.


asp.net bulk insert
asp net bulk insert from datatable
asp.net bulk update
asp net bulk edit gridview
asp.net core bulk insert
asp.net web api bulk update
asp.net core bulk update
asp.net c# bulk insert into sql
bulk insert asp.net c#
bulk update in asp.net c#
asp.net mvc bulk insert
asp.net mvc bulk update


asp.net batch processing
asp.net batch job
asp.net batch insert
asp.net core batch