- 修复 AsTable 子查询未传播的问题;#1103

This commit is contained in:
2881099
2022-06-09 12:54:50 +08:00
parent e9949b58ff
commit d4cc9521db
10 changed files with 105 additions and 91 deletions

View File

@ -1,4 +1,4 @@
using FreeSql.DataAnnotations;
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -83,6 +83,13 @@ namespace FreeSql.Tests.SqlServerExpression
IEnumerable<int> testlinqlist = new List<int>(new[] { 1, 2, 3 });
var testlinq = select.Where(a => testlinqlist.Contains(a.testFieldInt)).ToList();
var testlinqlist2 = new List<TableAllType>(new[] {
new TableAllType{Id = 1,},
new TableAllType{Id = 2,},
new TableAllType{Id = 3,}
}).Select(a => a.Id).ToArray().Distinct();
var testlinq2 = select.Where(a => testlinqlist2.Contains(a.testFieldInt) && a.testFieldByte == 1).ToList();
//in not in
var sql111 = select.Where(a => new[] { 1, 2, 3 }.Contains(a.testFieldInt)).ToList();
var sql112 = select.Where(a => new[] { 1, 2, 3 }.Contains(a.testFieldInt) == false).ToList();