Learn Entity Framework Core: https://www.learnentityframeworkcore.com/
Entity Framework Core Tutorial: https://entityframeworkcore.com/
Entity Framework 6 Tutorial: https://entityframework.net/
Info
Version: | 1.2.3 |
Author(s): | lfpu |
Last Update: | Thursday, August 24, 2023 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | http://project_url_here_or_delete_this_line/ |
NuGet Url: | https://www.nuget.org/packages/LF.EntityFramework.Extention |
Install
Install-Package LF.EntityFramework.Extention
dotnet add package LF.EntityFramework.Extention
paket add LF.EntityFramework.Extention
LF.EntityFramework.Extention Download (Unzip the "nupkg" after downloading)
Dependencies
- EntityFramework(>= 6.4.4)
Tags
Bulk insert 1,000,000 records just need half minute
How to use it:
using LF.EntityFramework.Extention;
DBContextExtensions.SingleTaskMaxCount = 10000;//more than 10000 entities start multiple threads
DBContextExtensions.TaskCount = 10; //threads count for bulk do it
var t = DBcontext.Database.BeginTransaction();
DBcontext.BulkInsert(IEnumrobleEntities)
DBcontext.BulkUpdate(IEnumrobleEntities)
DBcontext.BulkDelete(IEnumrobleEntities)
t.Commit();
V1.2.1---->Multiple threads handler, faster than faster
V1.2.2---->Add update lock
V1.2.3---->Add Entity Operation
Example:
public class XXX:EntityOperator{}
XXX a =new XXX();
XXX b =new XXX();
System.Dynamic.ExpandoObject c = a+b;
XXX aa=c.ToObject(XXX)();.