diff --git a/Src/Asp.Net/OracleTest/UnitTest/UThread.cs b/Src/Asp.Net/OracleTest/UnitTest/UThread.cs index 13d203afe..37a9513dd 100644 --- a/Src/Asp.Net/OracleTest/UnitTest/UThread.cs +++ b/Src/Asp.Net/OracleTest/UnitTest/UThread.cs @@ -40,7 +40,7 @@ namespace OrmTest } } }); - public static SqlSugarClient singleDb = new SqlSugarClient(new ConnectionConfig() + public static SqlSugarScope singleDb = new SqlSugarScope(new ConnectionConfig() { DbType = DbType.Oracle, ConnectionString = Config.ConnectionString, diff --git a/Src/Asp.Net/OracleTest/UnitTest/Updateable.cs b/Src/Asp.Net/OracleTest/UnitTest/Updateable.cs index e5c8d8ab7..306a36869 100644 --- a/Src/Asp.Net/OracleTest/UnitTest/Updateable.cs +++ b/Src/Asp.Net/OracleTest/UnitTest/Updateable.cs @@ -43,8 +43,8 @@ namespace OrmTest { IsRemind = saveDiary.IsRemind, }).Where(it => it.ID == saveDiary.ID).ToSql(); - // UValidate.Check(sql.Key, @"UPDATE ""UNITBOOLTEST"" SET - //""BOOLVALUE"" =:BoolValue WHERE ""ID"" =:Id"", "Updateable"); + // UValidate.Check(sql.Key, @"UPDATE ""UNITBOOLTEST"" SET + //""BOOLVALUE"" =:BoolValue WHERE ""ID"" =:Id"", "Updateable"); // sql = Db.Updateable().SetColumns(it => new UnitDiary() @@ -53,9 +53,21 @@ namespace OrmTest //}).Where(it => it.ID == saveDiary.ID).ToSql(); //UValidate.Check(sql.Key, @"UPDATE ""DIARY"" SET //""TYPEID"" = @Const0 WHERE ( ""ID"" = :ID1 )", "Updateable"); + Db.CodeFirst.InitTables(); + Db.Updateable(new List { + new UnitGuidTest() { Id = Guid.NewGuid(),name= "a" ,guid=Guid.NewGuid()}, + new UnitGuidTest() { Id = Guid.NewGuid(),name= "a" } + }).ExecuteCommand(); } } + public class UnitGuidTest + { + [SugarColumn(IsPrimaryKey =true)] + public Guid Id { get; set; } + public string name { get; set; } + public Guid guid { get; set; } + } public class UnitSaveDiary { public int ID { get; set; } diff --git a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs index a5e7b54b8..6ed080558 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleUpdateBuilder.cs @@ -63,6 +63,10 @@ namespace SqlSugar { return value; } + else if (type==UtilConstants.GuidType) + { + return "'" + value.ToString() + "'"; + } else if (type == UtilConstants.ByteArrayType) { string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");