diff --git a/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj b/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj index 44446006f..f83a28085 100644 --- a/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj +++ b/Src/Asp.Net/SqlServerTest/SqlServerTest.csproj @@ -80,7 +80,8 @@ - + + diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs b/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs index 39a00f5c3..084430d3c 100644 --- a/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs +++ b/Src/Asp.Net/SqlServerTest/UnitTest/Main.cs @@ -31,6 +31,7 @@ namespace OrmTest } public static void Init() { + Filter(); Insert(); Insert2(); @@ -44,6 +45,7 @@ namespace OrmTest Queryable(); Queryable2(); QueryableAsync(); + AopTest(); //Thread(); //Thread2(); //Thread3(); diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/UAopTest.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UAopTest.cs new file mode 100644 index 000000000..4a672e0a6 --- /dev/null +++ b/Src/Asp.Net/SqlServerTest/UnitTest/UAopTest.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OrmTest +{ + public partial class NewUnitTest + { + + public static void AopTest() + { + var db = Db; + db.CurrentConnectionConfig.ConfigureExternalServices = new SqlSugar.ConfigureExternalServices() + { + + EntityNameService = (t, e) => { + + e.DbTableName = "dbo." + e.DbTableName; + } + }; + db.Queryable().Select(it=> new { + x=SqlSugar.SqlFunc.Subqueryable().Select(s=>s.Id) + }).ToList(); + db.CurrentConnectionConfig.ConfigureExternalServices = new SqlSugar.ConfigureExternalServices(); + } + } +} diff --git a/Src/Asp.Net/SqlServerTest/UnitTest/Test01.cs b/Src/Asp.Net/SqlServerTest/UnitTest/UTest01.cs similarity index 100% rename from Src/Asp.Net/SqlServerTest/UnitTest/Test01.cs rename to Src/Asp.Net/SqlServerTest/UnitTest/UTest01.cs