sunkaixuan 6 years ago
parent
commit
70bfac9a2a
  1. 6
      Src/Asp.Net/SqlServerTest/Config.cs
  2. 5
      Src/Asp.Net/SqlServerTest/Demos/9_Aop.cs
  3. 1
      Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs

6
Src/Asp.Net/SqlServerTest/Config.cs

@ -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";
}
}

5
Src/Asp.Net/SqlServerTest/Demos/9_Aop.cs

@ -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();
}
}
}

1
Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs

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

Loading…
Cancel
Save