Browse Source

Update Oracle

pull/1/head
sunkaixuan 4 years ago
parent
commit
53601e026a
  1. 2
      Src/Asp.Net/OracleTest/Bugs/BugTest1.cs
  2. 2
      Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleExpressionContext.cs

2
Src/Asp.Net/OracleTest/Bugs/BugTest1.cs

@ -29,6 +29,8 @@ namespace OrmTest.Test
var id=Enumerable.Range(0, 100).ToList();
// id = null;
Db.Queryable<Order>().Where(it => id.Contains(it.Id)).ToList();
Db.Insertable(new Order() { Name = "A", Price = 1, CustomId = 1, CreateTime = DateTime.Now }).ExecuteCommand();
var list= Db.Queryable<Order>().Where(it =>Convert.ToDecimal( 1.01) ==Convert.ToDecimal( 1.01)).ToList(); ;
}
}

2
Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleExpressionContext.cs

@ -168,7 +168,7 @@ namespace SqlSugar
public override string ToDecimal(MethodCallExpressionModel model)
{
var parameter = model.Args[0];
return string.Format(" TO_NUMBER({0}) )", parameter.MemberName);
return string.Format(" CAST({0} AS Number)", parameter.MemberName);
}
public override string ToDate(MethodCallExpressionModel model)

Loading…
Cancel
Save