Dapper-Extensions
Dapper-Extensions copied to clipboard
Get by id creates empty predicate.
The test case on master currently works because there is only 1 row in the database, so select without a where returns 1 row as expected.
Added breaking test case for SQL Server Get, though this bug may affect all providers.
The predicate is not filled out when using Get(value) but they work when using Get(object). I noticed that in DapperImplementor.GetMapAndPredicate, GetKeyPredicate is only called for Update and Delete, not Get.
This pull request does not fix anything, it will start to fail the build because this is a bug.
Workaround for developers trying to use Get is to use Get(new {}) syntax.
Workaround for Dapper-Extensions is to fix the documentation to say Get(new { id }) instead of Get(id).