diff --git a/Src/Asp.NetCore2/SqlSeverTest/Program.cs b/Src/Asp.NetCore2/SqlSeverTest/Program.cs index 9186af82b..4c56d56e2 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/Program.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/Program.cs @@ -7,8 +7,7 @@ namespace OrmTest public class Program { static void Main(string[] args) - { - UnitStringToExp.Init(); + { //Each example will automatically create a table and can run independently. //每个例子都会自动建表 并且可以独立运行 _1_CodeFirst.Init(); diff --git a/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UnitStringToExp.cs b/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UnitStringToExp.cs index 2331cddb2..502723961 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UnitStringToExp.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/UserTestCases/UnitTest/UnitStringToExp.cs @@ -64,7 +64,37 @@ namespace OrmTest " {0} as id", " it.Name as Name" } , 10) - .InSingleAsync(1).GetAwaiter().GetResult(); + .First(); + + var userInfo6 = db.Queryable() + .In(1) + .Select("it", + new List() + { "it.Id as userId", + " {0} as id", + " it.Name as Name" } + , 10) + .Single(); + + + var userInfo7 = db.Queryable() + .Select("it", + new List() + { "it.Id as userId", + " {0} as id", + " it.Name as Name" } + , 10) + .FirstAsync().GetAwaiter().GetResult(); + + var userInfo8 = db.Queryable() + .In(1) + .Select("it", + new List() + { "it.Id as userId", + " {0} as id", + " it.Name as Name" } + , 10) + .SingleAsync().GetAwaiter().GetResult(); } private static void Test03()