Generic Add Method for Dynamic Parameters
Addresses #958
Unfortunately this would be a breaking change. While we can add the generic versions, removing the previous ones is not an option until the next major release. Can you please add them back and a test that shows these fixing the issue?
We actually noticed an issue with the missing non-generic Add methods and added them back.
I'm fine adding a test for the generic methods. Can you tell me what I have to do to run the tests?
@roend83 Ah yes, git is just doing a horrible job of diffing here - to run the tests just push :) Take advantage of the build server running them for you on this PR :)
@NickCraver I added a couple tests that call the 2 new generic methods. Let me know if these look ok.
@NickCraver & @mgravell Are there any plans to pull this in soon?
Hey all, I just ran across this PR which looks to resolve an issue I've just run into:
DateTime? dateParam = default;
var params = new { dateParam = dateParam };
var result = connection.ExecuteScalar<object>("SELECT 1 FROM table WHERE date = @dateParam", params);
I'm using a Postgres database, and receive an exception: could not determine data type of parameter $1.
Of course this is a silly example, but it gets the point across. Are there any plans for this PR to make it into the code base soon?
@NickCraver @mgravell ping?