Update demo

This commit is contained in:
sunkaixuan
2019-06-04 20:01:28 +08:00
parent 76d4dfef87
commit 4ea9b897e2
32 changed files with 70 additions and 173 deletions

View File

@@ -43,16 +43,16 @@ namespace OrmTest
{
IsRemind = saveDiary.IsRemind,
}).Where(it => it.ID == saveDiary.ID).ToSql();
UValidate.Check(sql.Key, @"UPDATE [Diary] SET
[IsRemind] = @Const0 WHERE ( [ID] = @ID1 )", "Updateable");
UValidate.Check(sql.Key, @"UPDATE ""DIARY"" SET
""ISREMIND"" = @Const0 WHERE ( ""ID"" = @ID1 )", "Updateable");
sql = Db.Updateable<UnitDiary>().SetColumns(it => new UnitDiary()
{
TypeID = saveDiary.TypeID,
}).Where(it => it.ID == saveDiary.ID).ToSql();
UValidate.Check(sql.Key, @"UPDATE [Diary] SET
[TypeID] = @Const0 WHERE ( [ID] = @ID1 )", "Updateable");
UValidate.Check(sql.Key, @"UPDATE ""DIARY"" SET
""TYPEID"" = @Const0 WHERE ( ""ID"" = @ID1 )", "Updateable");
}
}