增加更新操作测试代码

This commit is contained in:
Kenton
2025-03-10 17:12:31 +08:00
parent 6a489b4cb4
commit 8bb6e94fd1
2 changed files with 11 additions and 1 deletions

View File

@@ -124,6 +124,15 @@ namespace DB2CoreTest.CURD
}).OrderBy(ui => ui.UserName).ToList();
}
public static void Updateable()
{
// 获取新的数据库实例
var db = DbHelper.GetNewDb();
//更新用户
var ret = db.Updateable<UserInfo>(p => p.UserName == "test").Where(p => p.UserName == "admin").ExecuteCommand();
}
public static void Deleteable()
{
// 获取新的数据库实例