Browse Source

-

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
99db4d6d87
  1. 5
      OrmTest/Demo/Update.cs

5
OrmTest/Demo/Update.cs

@ -49,6 +49,11 @@ namespace OrmTest.Demo
var t10 = db.Updateable<Student>()
.UpdateColumns(it => new Student() { Name="a",CreateTime=DateTime.Now })
.Where(it => it.Id == 11).ExecuteCommand();
//Rename
db.MappingTables.Add("School", "Student");
db.Updateable<School>().UpdateColumns(it => new School() { Name = "jack" }).Where(it => it.Id == 1).ExecuteCommand();
//Update Student set Name='jack' Where Id=1
}
public static SqlSugarClient GetInstance()
{

Loading…
Cancel
Save