mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update Demo
This commit is contained in:
parent
347b88546d
commit
4333bfd90b
@ -116,10 +116,10 @@ namespace OrmTest.UnitTest
|
||||
string name = "x";
|
||||
var t10 = db.Updateable<Student>().UpdateColumns(it => new Student() { Name =name, SchoolId=updateObj.SchoolId }).Where(it=>it.Id==11).ToSql();
|
||||
base.Check(@"UPDATE `STudent` SET
|
||||
`SchoolId` = @Const0 , `Name` = @const3 WHERE ( `ID` = @Id1 )", new List<SugarParameter>() {
|
||||
new SugarParameter("@const3","x"),
|
||||
new SugarParameter("@Const0",18),
|
||||
new SugarParameter("@Id1",11)},
|
||||
`SchoolId` = @Const1 , `Name` = @Const0 WHERE ( `ID` = @Id2 )", new List<SugarParameter>() {
|
||||
new SugarParameter("@Const1",18),
|
||||
new SugarParameter("@Const0","x"),
|
||||
new SugarParameter("@Id2",11)},
|
||||
t10.Key,
|
||||
t10.Value,
|
||||
"Update 10 error"
|
||||
|
@ -8,6 +8,6 @@ namespace OrmTest
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
public static string ConnectionString = @"DataSource=F:\MyOpenSource\SqlSugar4.XNew\SqlSugar\Src\Asp.Net\SqliteTest\DataBase\SqlSugar4xTest.sqlite";
|
||||
public static string ConnectionString = @"DataSource=D:\MyGit\SqlSugar\Src\Asp.Net\SqliteTest\DataBase\SqlSugar4xTest.sqlite";
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
@ -116,10 +116,10 @@ namespace OrmTest.UnitTest
|
||||
string name = "x";
|
||||
var t10 = db.Updateable<Student>().UpdateColumns(it => new Student() { Name =name, SchoolId=updateObj.SchoolId }).Where(it=>it.Id==11).ToSql();
|
||||
base.Check(@"UPDATE `STudent` SET
|
||||
`SchoolId` = @Const0 , `Name` = @const3 WHERE ( `ID` = @Id1 )", new List<SugarParameter>() {
|
||||
new SugarParameter("@const3","x"),
|
||||
new SugarParameter("@Const0",18),
|
||||
new SugarParameter("@Id1",11)},
|
||||
`SchoolId` = @Const1 , `Name` = @Const0 WHERE ( `ID` = @Id2 )", new List<SugarParameter>() {
|
||||
new SugarParameter("@Const1",18),
|
||||
new SugarParameter("@Const0","x"),
|
||||
new SugarParameter("@Id2",11)},
|
||||
t10.Key,
|
||||
t10.Value,
|
||||
"Update 10 error"
|
||||
|
Loading…
Reference in New Issue
Block a user