Browse Source

Oracle support DbType.Nvarchar2

SqlSugar5
sunkaixuan 2 years ago
parent
commit
648b77f807
  1. 1
      Src/Asp.Net/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs
  2. 4
      Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs

1
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;

4
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;

Loading…
Cancel
Save