Wrong GridIndex for Identity
I had a problem with QueryAsync (error sql parameter not found, but I use a dynamicparameter) and found out that the "Identity" default constructor use GridIndex with 0, but it should use -1 (for dynamic Parameters). Before calling QueryAsync I used QueryMultiple with the same sql statement and GridReader.ReadAsync cached the query with no parameters. So there was an error in QueryAsync that no parameters were passed to the SqlCommand.
Wrong: internal Identity(string sql, CommandType? commandType, IDbConnection connection, Type type, Type parametersType) : this(sql, commandType, connection.ConnectionString, type, parametersType, 0, 0) { /* base call */ }
Correct: internal Identity(string sql, CommandType? commandType, IDbConnection connection, Type type, Type parametersType) : this(sql, commandType, connection.ConnectionString, type, parametersType, 0, -1) { /* base call */ }
Maybe the same as #1678