This commit is contained in:
sunkaixuan
2019-04-10 07:43:10 +08:00
parent 61a9005c16
commit 70bfac9a2a
3 changed files with 7 additions and 5 deletions

View File

@@ -8,8 +8,8 @@ namespace OrmTest
{
public class Config
{
public static string ConnectionString = "server=.;uid=sa;pwd=@jhl85661501;database=SQLSUGAR4XTEST";
public static string ConnectionString2 = "server=.;uid=sa;pwd=@jhl85661501;database=sqlsugar4xtest";
public static string ConnectionString3 = "server=.;uid=sa;pwd=@jhl85661501;database=sqlsugar4xtesT";
public static string ConnectionString = "server=.;uid=sa;pwd=haosql;database=SQLSUGAR4XTEST";
public static string ConnectionString2 = "server=.;uid=sa;pwd=haosql;database=sqlsugar4xtest";
public static string ConnectionString3 = "server=.;uid=sa;pwd=haosql;database=sqlsugar4xtesT";
}
}

View File

@@ -56,6 +56,7 @@ namespace OrmTest.Demo
var data = it.BusinessData;
var type = it.DiffType;
var time = it.Time;
Console.WriteLine(it.DiffType);
};
@@ -86,8 +87,8 @@ namespace OrmTest.Demo
.ExecuteReturnIdentity();
db.Saveable(new Student() {Name="saveinsert"}).EnableDiffLogEvent().ExecuteCommand();
db.Saveable(new Student() { Id=id, Name = "saveinsert" }).EnableDiffLogEvent().ExecuteCommand();
var enrity= db.Saveable(new Student() {Name="saveinsert"}).EnableDiffLogEvent().ExecuteReturnEntity();
db.Saveable(new Student() { Id= enrity.Id, Name = "saveinsert" }).EnableDiffLogEvent().ExecuteCommand();
}
}
}

View File

@@ -131,6 +131,7 @@ namespace SqlSugar
public ISaveable<T> EnableDiffLogEvent(object businessData = null)
{
LoadInsertable();
LoadUpdateable();
if (this.insertable != null)
{
this.insertable.EnableDiffLogEvent(businessData);