- 优化 ISelect.GroupBy 查询,增加 .Value 实现聚合源字段查询,ToList(a => a.Sum(a.Value.Score));

- 增加 Expression string.Concat;
This commit is contained in:
28810
2019-04-25 12:34:09 +08:00
parent ddd5e81a67
commit 02ab4949c0
44 changed files with 466 additions and 86 deletions

View File

@ -1,4 +1,5 @@
using FreeSql.DataAnnotations;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Linq;
@ -16,6 +17,10 @@ namespace FreeSql.Tests.MySqlExpression {
[Fact]
public void Array() {
int[] nullarr = null;
Assert.Throws<MySqlException>(() => { select.Where(a => nullarr.Contains(a.testFieldInt)).ToList(); });
Assert.Throws<MySqlException>(() => { select.Where(a => new int[0].Contains(a.testFieldInt)).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();