From 4e740c3072456cc6ff192b5166e74572ed49accf Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Mon, 11 Sep 2023 18:14:50 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=20AND=20OR=20=E7=AE=80?= =?UTF-8?q?=E5=86=99=E7=9A=84=E8=A1=A8=E8=BE=BE=E5=BC=8F=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Examples/base_entity/Program.cs | 2 + FreeSql.DbContext/FreeSql.DbContext.xml | 18 +++++ FreeSql/FreeSql.xml | 98 ------------------------- FreeSql/Internal/CommonExpression.cs | 1 + 4 files changed, 21 insertions(+), 98 deletions(-) diff --git a/Examples/base_entity/Program.cs b/Examples/base_entity/Program.cs index 2a288c0de..b09362ba3 100644 --- a/Examples/base_entity/Program.cs +++ b/Examples/base_entity/Program.cs @@ -600,6 +600,8 @@ namespace base_entity BaseEntity.Initialization(fsql, () => _asyncUow.Value); #endregion + var tqq01 = fsql.Select().Where(a => a.IsDeleted || a.IsDeleted || a.IsDeleted).ToSql(); + fsql.GlobalFilter.Apply("test01", a => a.IsDeleted == false); var updatejoin031sql = fsql.Update() diff --git a/FreeSql.DbContext/FreeSql.DbContext.xml b/FreeSql.DbContext/FreeSql.DbContext.xml index 594fbad32..26522f106 100644 --- a/FreeSql.DbContext/FreeSql.DbContext.xml +++ b/FreeSql.DbContext/FreeSql.DbContext.xml @@ -733,6 +733,15 @@ + + + 根据Assembly扫描所有继承IEntityTypeConfiguration<T>的配置类 + + + + + + 创建普通数据上下文档对象 @@ -791,5 +800,14 @@ + + + 批量注入 Repository,可以参考代码自行调整 + + + + + + diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml index 368317df9..9e33336b2 100644 --- a/FreeSql/FreeSql.xml +++ b/FreeSql/FreeSql.xml @@ -1084,82 +1084,6 @@ - - - 动态创建实体类型 - - - - - 配置Class - - 类名 - 类标记的特性[Table(Name = "xxx")] [Index(xxxx)] - - - - - 配置属性 - - 属性名称 - 属性类型 - 属性标记的特性-支持多个 - - - - - 配置属性 - - 属性名称 - 属性类型 - 该属性是否重写父类属性 - 属性标记的特性-支持多个 - - - - - 配置属性 - - 属性名称 - 属性类型 - 该属性是否重写父类属性 - 属性默认值 - 属性标记的特性-支持多个 - - - - - 配置父类 - - 父类类型 - - - - - Override属性 - - - - - - Emit动态创建出Class - Type - - - - - - 首字母小写 - - - - - - - 首字母大写 - - - - 获取实体的主键值,以 "*|_,[,_|*" 分割,当任意一个主键属性无值时,返回 null @@ -5824,28 +5748,6 @@ 请使用 fsql.InsertDict(dict) 方法插入字典数据 - - - 动态构建Class Type - - - - - - 根据字典,创建 table 对应的实体对象 - - - - - - - - 根据实体对象,创建 table 对应的字典 - - - - - C#: that >= between && that <= and diff --git a/FreeSql/Internal/CommonExpression.cs b/FreeSql/Internal/CommonExpression.cs index 493dfbfc7..2471448dd 100644 --- a/FreeSql/Internal/CommonExpression.cs +++ b/FreeSql/Internal/CommonExpression.cs @@ -947,6 +947,7 @@ namespace FreeSql.Internal case "OR": if (leftMapColumn != null) left = $"{left} = {formatSql(true, null, null, null)}"; else left = GetBoolString(left); + if (rightMapColumn == null) rightMapColumn = SearchColumnByField(tsc._tables, tsc.currentTable, right); if (rightMapColumn != null) right = $"{right} = {formatSql(true, null, null, null)}"; else right = GetBoolString(right); break;