diff --git a/Src/Asp.Net/SqlServerTest/Config.cs b/Src/Asp.Net/SqlServerTest/Config.cs index d90121c15..95d8f3261 100644 --- a/Src/Asp.Net/SqlServerTest/Config.cs +++ b/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"; } } diff --git a/Src/Asp.Net/SqlServerTest/Demos/9_Aop.cs b/Src/Asp.Net/SqlServerTest/Demos/9_Aop.cs index 2bda6dc7c..2a030ad24 100644 --- a/Src/Asp.Net/SqlServerTest/Demos/9_Aop.cs +++ b/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(); } } } \ No newline at end of file diff --git a/Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs index c7e6c3ddf..b7116a2e9 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs @@ -131,6 +131,7 @@ namespace SqlSugar public ISaveable EnableDiffLogEvent(object businessData = null) { LoadInsertable(); + LoadUpdateable(); if (this.insertable != null) { this.insertable.EnableDiffLogEvent(businessData);