diff --git a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs index a1484258d..c04b267b3 100644 --- a/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs +++ b/Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs @@ -11,6 +11,7 @@ namespace SqlSugar { public bool IsRefCursor { get; set; } public bool IsClob { get; set; } + public bool IsNvarchar2 { get; set; } public SugarParameter(string name, object value) { this.Value = value; diff --git a/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs b/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs index a14319433..92ded455e 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs @@ -169,6 +169,10 @@ namespace SqlSugar { sqlParameter.OracleDbType = OracleDbType.RefCursor; } + if (parameter.IsNvarchar2&& parameter.DbType==System.Data.DbType.String) + { + sqlParameter.OracleDbType = OracleDbType.NVarchar2; + } if (parameter.IsClob) { sqlParameter.OracleDbType = OracleDbType.Clob;