mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 修复 AsTable 子查询未传播的问题;#1103
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user