Update unit test

This commit is contained in:
sunkaixuna
2021-11-21 13:47:46 +08:00
parent 42f0ab0d16
commit 40c2574282
3 changed files with 19 additions and 3 deletions

View File

@@ -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<UnitDiary>().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<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 int ID { get; set; }