nghiand1010 / Dapper.Contrib.Bulk

Bulk action for dapper contrib
4 stars 4 forks source link

Inconsistent parameter types #1

Closed Craigjw closed 1 month ago

Craigjw commented 7 months ago

The parameter types are inconsistent, some use IEnumerable while others use List

An example of this can be seen in SqlMapperExtensions.cs line 106:

public static void BulkDelete<T>(this IDbConnection connection, List<T> entities, IDbTransaction transaction = null, int? commandTimeout = null) where T : class

While most others use IEnumerable, such as line 82, just above the previous example.

public static void BulkUpdate<T>(this IDbConnection connection, IEnumerable<T> entities, IDbTransaction transaction = null, int? commandTimeout = null) where T : class

Is it possible to update these to be more consistently and use either one or the other, but not both. I would suggest changing them all to IEnumerable.

Great work overall.

Thanks.

nghiand1010 commented 1 month ago

Thank I will fix that