anjoy8 / Blog.Core

💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
http://apk.neters.club/.doc
Apache License 2.0
5.06k stars 1.38k forks source link

最新版生成多sql条件时语句不正确 #355

Closed liyuchuan86 closed 9 months ago

liyuchuan86 commented 10 months ago

切换成sqlserve后 多条件生成的语句 SELECT COUNT(1) FROM (SELECT [Id],[Sort],[DocketType],[DocketKey],[HeadCode],[ZeroCycle],[DocketDateCodeType],[DocketNumCodeLen],[TailCode],[UpdateUserId],[UpdateTime],[LastDocketDate],[LastNumCode] FROM [Sys_DocketCodeRule] WHERE ((( 1 = 1 ) & ([HeadCode] like '%'+@MethodConst1+'%') ) & ( [DocketType] = @DocketType2 ))) CountTable 语法错误,经检查是扩展的条件连接方法用的And 改成 AndAlso 问题解决

Blog.Core.Common\Extensions\Extention.Expression.cs image

LemonNoCry commented 10 months ago

欢迎提交pr

anjoy8 commented 10 months ago

提交个PR吧,可以成为贡献者