UpdateColumns SqlFunc.IIF SqlFunc.IF BUG

This commit is contained in:
610262374@qq.com
2018-12-11 22:46:26 +08:00
parent a43817a402
commit 8fd8deb4c5
3 changed files with 17 additions and 1 deletions

View File

@@ -93,6 +93,18 @@ namespace OrmTest.Demo
dtList.Add(dt);
dtList.Add(dt2);
var t666 = db.Updateable(dtList).AS("student").WhereColumns("id").With(SqlWith.UpdLock).ExecuteCommand();
var t20 = db.Updateable<Student>().UpdateColumns(p => new Student()
{
SchoolId = SqlFunc.IIF(p.Id == 1, 2, 3)
}).Where(p => p.Id == 10000).ExecuteCommand();
var t21= db.Updateable<Student>().UpdateColumns(p => new Student()
{
SchoolId = SqlFunc.IF(p.Id==1).Return(1).End(p.Id)
}).Where(p => p.Id == 10000).ExecuteCommand();
}
}
}