Dapper.Contrib (https://github.com/StackExchange/Dapper/tree/master/Dapper.Contrib) states that they have several methods accepting IEnumerable lists, however I can not seem to find any of these methods. Using .NET Core 2, is this an outdated readme.md or an incompatibility with .NET Core?
Missing methods:
int Insert<T>(Enumerable<T> list);
bool Update<T>(Enumerable<T> list);
bool Delete<T>(Enumerable<T> list);
I've already gotten it working with just regular Dapper and some SQL, but I am just interested where these methods are.
The same methods can be used for single objects or lists of objects. If you check the source code for Insert, it checks whether the entityToInsert
is an array or IEnumerable.
You should be able to write
myConnection.Insert(myListOfItems);