querybuilder icon indicating copy to clipboard operation
querybuilder copied to clipboard

Insert many with IEnumerable<object>

Open Shepardeon opened this issue 2 years ago • 1 comments

Hi !

I noticed SqlKata was able to insert multiple records with one query by providing an IEnumerable<string> as columns IEnumerable<IEnumerable<object>> as values; which works great, however it feels a bit awkward to use. Especially since there is an implementation of AsInsert() that can take an object. So, I think it would make sense to have an overload of AsInsert() (and therefore of Insert() and InsertAsync()) which takes an IEnumerable<object> and compile the relevant query.

If you feel like this could be a nice addition to the library, I could try myself at a PR.

Cheers :)

Shepardeon avatar Mar 02 '23 13:03 Shepardeon

I've thought the same thing!

JakeAlmer avatar Mar 21 '23 19:03 JakeAlmer