mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
Update unit test
This commit is contained in:
parent
42f0ab0d16
commit
40c2574282
@ -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,
|
DbType = DbType.Oracle,
|
||||||
ConnectionString = Config.ConnectionString,
|
ConnectionString = Config.ConnectionString,
|
||||||
|
@ -53,9 +53,21 @@ namespace OrmTest
|
|||||||
//}).Where(it => it.ID == saveDiary.ID).ToSql();
|
//}).Where(it => it.ID == saveDiary.ID).ToSql();
|
||||||
//UValidate.Check(sql.Key, @"UPDATE ""DIARY"" SET
|
//UValidate.Check(sql.Key, @"UPDATE ""DIARY"" SET
|
||||||
//""TYPEID"" = @Const0 WHERE ( ""ID"" = :ID1 )", "Updateable");
|
//""TYPEID"" = @Const0 WHERE ( ""ID"" = :ID1 )", "Updateable");
|
||||||
|
Db.CodeFirst.InitTables<UnitGuidTest>();
|
||||||
|
Db.Updateable(new List<UnitGuidTest> {
|
||||||
|
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 class UnitSaveDiary
|
||||||
{
|
{
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
|
@ -63,6 +63,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
else if (type==UtilConstants.GuidType)
|
||||||
|
{
|
||||||
|
return "'" + value.ToString() + "'";
|
||||||
|
}
|
||||||
else if (type == UtilConstants.ByteArrayType)
|
else if (type == UtilConstants.ByteArrayType)
|
||||||
{
|
{
|
||||||
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
string bytesString = "0x" + BitConverter.ToString((byte[])value).Replace("-", "");
|
||||||
|
Loading…
Reference in New Issue
Block a user