Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rytmis/54858632ca94b6a82203 to your computer and use it in GitHub Desktop.
Save rytmis/54858632ca94b6a82203 to your computer and use it in GitHub Desktop.
public class SqlAzureClientDriverWithParameterSizeWorkaround : SqlAzureClientDriver {
protected override void InitializeParameter(IDbDataParameter dbParam, string name, SqlType sqlType) {
base.InitializeParameter(dbParam, name, sqlType);
if (sqlType.DbType == DbType.StringFixedLength && sqlType.LengthDefined && sqlType.Length == 1) {
dbParam.Size = 1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment