zzzprojects / EntityFramework-Plus

Entity Framework Plus extends your DbContext with must-haves features: Include Filter, Auditing, Caching, Query Future, Batch Delete, Batch Update, and more
https://entityframework-plus.net/
MIT License
2.21k stars 314 forks source link

Implement BatchInsert #306

Open AlexRadch opened 6 years ago

AlexRadch commented 6 years ago

I think BatchInsert implementation is like BatchUpdate implementation but is little easy.

// Copy OrderItems from fromOrder to toOrder
var items = fromOrder.Items();
items.BatchInsert(i => new OrderItem { OrderId = toOrder.Id, ItemName == i.ItemName, ItemCount == i.ItemCount});
JonathanMagnan commented 6 years ago

Hello @AlexRadch ,

Thank you for your suggestion.

BatchInsert is already in our todo list. Unfortunately, for the next few months, we will focus for our free support to improve some stuff on our side such as: Making .NET Fiddle compatible with Entity Framework to allow to create online examples and re-working our core to better handle all providers.

We will soon provide a roadmap.

Best Regards,

Jonathan

inprotech-dev commented 5 years ago

We would love the BatchInsert feature too!

JonathanMagnan commented 5 years ago

Thank you for the reminder.

We will start to look at it to add it on https://entityframework-classic.net/

Once it's stable, we will try to import the feature in EF Plus as well.

Best Regards,

Jonathan