Update DisableNvarchar

This commit is contained in:
sunkaixuan 2025-04-02 15:35:42 +08:00
parent 0954bed803
commit 34235d9a48

View File

@ -179,7 +179,12 @@ namespace SqlSugar
} }
else else
{ {
this.Context.Parameters.Add(new SugarParameter(appendValue, value)); var p = new SugarParameter(appendValue, value);
if (p.DbType == System.Data.DbType.String && this.Context?.SugarContext?.Context?.CurrentConnectionConfig?.MoreSettings?.DisableNvarchar == true)
{
p.DbType = System.Data.DbType.AnsiString;
}
this.Context.Parameters.Add(p);
} }
} }
else else