Prechádzať zdrojové kódy

Merge pull request #2 from LithWang/master

2.2.0-preview
Lith 7 mesiacov pred
rodič
commit
a571763523

+ 1 - 1
src/Versions.props

@@ -1,6 +1,6 @@
 <Project>
     <PropertyGroup>
-        <Version>2.2.0-develop</Version>
+        <Version>2.2.0-preview</Version>
         <Vitorm_Version>[2.2.0-preview, 2.3.0)</Vitorm_Version>
     </PropertyGroup>
 </Project>

+ 1 - 1
test/Vitorm.Excel.MsTest/CommonTest/Query_LeftJoin_ByGroupJoin_Test.cs

@@ -82,7 +82,7 @@ namespace Vitorm.MsTest.CommonTest
                         father,
                         mother,
                         testId = user.id + 100,
-                        hasFather = father.name != null ? true : false
+                        hasFather = father != null && father.name != null ? true : false
                     };
 
                 query = query.Skip(1).Take(2);

+ 5 - 5
test/Vitorm.Excel.MsTest/CommonTest/Query_LeftJoin_BySelectMany_Test.cs

@@ -64,7 +64,7 @@ namespace Vitorm.MsTest.CommonTest
                         userClass,
                         userClass.name,
                         testId = user.id + 100,
-                        hasFather = father.name != null ? true : false
+                        hasFather = father != null && father.name != null ? true : false
                     };
 
                 query = query.Skip(1).Take(2);
@@ -93,7 +93,7 @@ namespace Vitorm.MsTest.CommonTest
             {
                 var query = from user in userQuery
                             from father in userQuery.Where(father => user.fatherId == father.id).DefaultIfEmpty()
-                            where user.id > 2 && father.name != null
+                            where user.id > 2 && father != null && father.name != null
                             orderby user.id
                             select new
                             {
@@ -144,8 +144,8 @@ namespace Vitorm.MsTest.CommonTest
                                 userId = user.id + 100,
                                 hasFather = user.fatherId != null ? true : false,
                                 hasFather2 = father != null,
-                                fatherName = father.name,
-                                motherName = mother.name,
+                                fatherName = father != null ? father.name : default,
+                                motherName = mother != null ? mother.name : default,
                             };
 
                 var userList = query.ToList();
@@ -171,7 +171,7 @@ namespace Vitorm.MsTest.CommonTest
             {
                 var count = (from user in userQuery
                              from father in userQuery.Where(father => user.fatherId == father.id).DefaultIfEmpty()
-                             where user.id > 2 && father.name == null
+                             where user.id > 2 && (father == null || father.name == null)
                              select new
                              {
                                  father