If you have a query where two fields have the same name in a resultset, and in your dapper call you explicitly map to an object... something like:
Connection.Query<MyObjectWithIdField>("Select Id, 1 as Id from MyTable");
Dapper seems to be mapping the last instance of Id it finds in the row to the objects field. In this circumstance it seems like it should be throwing an exception as theres no way of knowing which of the Id fields are the intended result.
If you have a query where two fields have the same name in a resultset, and in your dapper call you explicitly map to an object... something like:
Connection.Query<MyObjectWithIdField>("Select Id, 1 as Id from MyTable");Dapper seems to be mapping the last instance of
Idit finds in the row to the objects field. In this circumstance it seems like it should be throwing an exception as theres no way of knowing which of theIdfields are the intended result.