You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dapper 2.1.11, and in particular #1975, changes how the command type is determined. It breaks some of our code by unexpectedly inferring "Stored Procedure" for a plain "SELECT * FROM Table". We found that the source code actually contained non-breaking space (ASCII 160) instead the normal space (ASCII 32). That code was working fine in the previous Dapper version 2.1.4.
The irony here is: I was actually using an "all whitespace characters" version, and changed it at the last moment to try to prevent unexpected scenarios with weird characters. I'll change back to that. For now:
use a previous Dapper version, or
explicitly specify the command type (this only applies if omitted), or
use regular spaces
But: thanks for the report, will fix, probably today
Dear Dapper maintainers
Dapper 2.1.11, and in particular #1975, changes how the command type is determined. It breaks some of our code by unexpectedly inferring "Stored Procedure" for a plain "SELECT * FROM Table". We found that the source code actually contained non-breaking space (ASCII 160) instead the normal space (ASCII 32). That code was working fine in the previous Dapper version 2.1.4.
This is with a connection to SQL Server.
One possibility to solve this could be to use char.iswhitespace instead of the hardcoded list of whitespace characters CommandDefinition.cs#L113 ?
Thanks for your help and the work done in Dapper.
The text was updated successfully, but these errors were encountered: