mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
增加更新操作测试代码
This commit is contained in:
parent
6a489b4cb4
commit
8bb6e94fd1
@ -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()
|
||||
{
|
||||
// 获取新的数据库实例
|
||||
|
@ -5,13 +5,14 @@ public class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
CodeFirst.Init();
|
||||
//CodeFirst.Init();
|
||||
CodeFirst.Insertable();
|
||||
CodeFirst.Queryable();
|
||||
CodeFirst.JoinQuery();
|
||||
CodeFirst.PageQuery();
|
||||
CodeFirst.OrderBy();
|
||||
CodeFirst.GroupBy();
|
||||
CodeFirst.Updateable();
|
||||
CodeFirst.Deleteable();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user