UnoSD / Moq.Dapper

Moq extensions for Dapper methods.
GNU General Public License v2.0
173 stars 78 forks source link

Split SetupDapperAsync and remove casting #60

Closed honzakuzel1989 closed 3 years ago

honzakuzel1989 commented 4 years ago

Make specific SetupDapperAsync function with Task return value and split SetupDapperAsync's switch.

UnoSD commented 3 years ago

In general, I agree and I prefer to avoid reflection, but in this implementation it creates several duplicate lines. Another approach could be to refactor and extract the common code, but, as it is, this PR doubles up the expression casting and SqlMapper check.