Dapper.Contrib icon indicating copy to clipboard operation
Dapper.Contrib copied to clipboard

Dapper.Contrib - suggestion to remove generic type of interface i.e. Insert<T>(T entity) => Insert(object o)

Open jfloodnet opened this issue 7 years ago • 0 comments

Is there any specific reason why the Insert/Update/Delete interface must be generically typed?

Using obj.GetType() instead of typeof(T) would mean that consumers would need to necessarily know the type themselves.

E.g it would be nice to be able to do something like this:

`

   private List<object> tracked = new List<object>();

    foreach (var item in tracked)
    {
        Sql.Insert(item);
    }

`

jfloodnet avatar May 30 '18 06:05 jfloodnet