tmsmith / Dapper-Extensions

Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. For more advanced querying scenarios, Dapper Extensions provides a predicate system. The goal of this library is to keep your POCOs pure by not requiring any attributes or base class inheritance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Criticar Bug, DeleteAsync doesn't work with predicates

juliotec opened this issue · comments

Please fix this ASAP, DeleteAsync doesn't work with any predicates and i will explain why

Right now your code is like this

image

both methods always call to

image

never go to

image

The Fix is very easy, just ad this

image

in this way the "runtime" must know which method use it

Why the issue is happening? simple

image

Both definitions have conflicts because one use generic T in the second parmeter and the other use object in the second parameter, if you doesn't expecify the generic T, "runtime" assume the generic method and never go to the object method, so if you especify the generic T, now "runtime" must know wich value is T.

please add the generic T in this method like this

image

I doens't know why nobody show this critical bug, DeleteAsync with predicates is usless

I'm trying to create a Pull Request but I can't, please fix and update the nuget package

I'm having this exact same problem. I'm using a custom default mapper so calling DeleteAsync() without the generic parameter is causing Dapper to try and load CustomAutoClassMapper<Object>. Understandably, this doesn't work so well.