mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	- 增加 IFreeSql.GlobalFilter 全局过滤器;
- 移除 TableAttribute.SelectFilter 功能;
This commit is contained in:
		@@ -1205,10 +1205,14 @@ namespace FreeSql.Internal
 | 
			
		||||
                    var errorKey = FreeUtil.Sha1($"{tb.Table.Type.FullName},{fl.ToString()}");
 | 
			
		||||
                    if (_dicGetWhereCascadeSqlError.ContainsKey(errorKey)) continue;
 | 
			
		||||
 | 
			
		||||
                    var visitor = new NewExpressionVisitor(newParameter, fl.Parameters.FirstOrDefault());
 | 
			
		||||
                    var visitor = new ReplaceVisitor();
 | 
			
		||||
                    try
 | 
			
		||||
                    {
 | 
			
		||||
                        var expExp = visitor.Replace(fl.Body);
 | 
			
		||||
                        var expExp = Expression.Lambda(
 | 
			
		||||
                            typeof(Func<,>).MakeGenericType(tb.Table.Type, typeof(bool)),
 | 
			
		||||
                            new ReplaceVisitor().Modify(fl.Body, newParameter),
 | 
			
		||||
                            newParameter
 | 
			
		||||
                        );
 | 
			
		||||
                        var whereSql = ExpressionLambdaToSql(expExp, new ExpTSC { _tables = null, _selectColumnMap = null, getSelectGroupingMapString = null, tbtype = SelectTableInfoType.From, isQuoteName = true, isDisableDiyParse = false, style = ExpressionStyle.Where, currentTable = tb.Table, alias001 = tb.Alias });
 | 
			
		||||
                        if (isEmpty == false)
 | 
			
		||||
                            sb.Append(" AND ");
 | 
			
		||||
@@ -1228,10 +1232,22 @@ namespace FreeSql.Internal
 | 
			
		||||
            }
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public string formatSql(object obj, Type mapType)
 | 
			
		||||
        class ReplaceVisitor : ExpressionVisitor
 | 
			
		||||
        {
 | 
			
		||||
            return string.Concat(_ado.AddslashesProcessParam(obj, mapType));
 | 
			
		||||
            private ParameterExpression parameter;
 | 
			
		||||
            public Expression Modify(Expression expression, ParameterExpression parameter)
 | 
			
		||||
            {
 | 
			
		||||
                this.parameter = parameter;
 | 
			
		||||
                return Visit(expression);
 | 
			
		||||
            }
 | 
			
		||||
            protected override Expression VisitMember(MemberExpression node)
 | 
			
		||||
            {
 | 
			
		||||
                if (node.Expression?.NodeType == ExpressionType.Parameter)
 | 
			
		||||
                    return Expression.Property(parameter, node.Member.Name);
 | 
			
		||||
                return base.VisitMember(node);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public string formatSql(object obj, Type mapType) => string.Concat(_ado.AddslashesProcessParam(obj, mapType));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@ using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Data;
 | 
			
		||||
using System.Data.Common;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
@@ -19,6 +20,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
        protected Func<string, string> _tableRule;
 | 
			
		||||
        protected StringBuilder _where = new StringBuilder();
 | 
			
		||||
        protected int _whereTimes = 0;
 | 
			
		||||
        protected List<GlobalFilter.Item> _whereGlobalFilter;
 | 
			
		||||
        protected List<DbParameter> _params = new List<DbParameter>();
 | 
			
		||||
        protected DbTransaction _transaction;
 | 
			
		||||
        protected DbConnection _connection;
 | 
			
		||||
@@ -31,6 +33,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _table = _commonUtils.GetTableByEntity(typeof(T1));
 | 
			
		||||
            this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
			
		||||
            if (_orm.CodeFirst.IsAutoSyncStructure && typeof(T1) != typeof(object)) _orm.CodeFirst.SyncStructure<T1>();
 | 
			
		||||
            _whereGlobalFilter = _orm.GlobalFilter.GetFilters();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected void ClearData()
 | 
			
		||||
@@ -38,6 +41,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _where.Clear();
 | 
			
		||||
            _whereTimes = 0;
 | 
			
		||||
            _params.Clear();
 | 
			
		||||
            _whereGlobalFilter = _orm.GlobalFilter.GetFilters();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public IDelete<T1> WithTransaction(DbTransaction transaction)
 | 
			
		||||
@@ -99,6 +103,24 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
        public IDelete<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class => this.Where($"{(notExists ? "NOT " : "")}EXISTS({select.ToSql("1")})");
 | 
			
		||||
        public IDelete<T1> WhereDynamic(object dywhere) => this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
			
		||||
 | 
			
		||||
        public IDelete<T1> DisableGlobalFilter(params string[] name)
 | 
			
		||||
        {
 | 
			
		||||
            if (_whereGlobalFilter.Any() == false) return this;
 | 
			
		||||
            if (name?.Any() != true)
 | 
			
		||||
            {
 | 
			
		||||
                _whereGlobalFilter.Clear();
 | 
			
		||||
                return this;
 | 
			
		||||
            }
 | 
			
		||||
            foreach (var n in name)
 | 
			
		||||
            {
 | 
			
		||||
                if (n == null) continue;
 | 
			
		||||
                var idx = _whereGlobalFilter.FindIndex(a => string.Compare(a.Name, n, true) == 0);
 | 
			
		||||
                if (idx == -1) continue;
 | 
			
		||||
                _whereGlobalFilter.RemoveAt(idx);
 | 
			
		||||
            }
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected string TableRuleInvoke()
 | 
			
		||||
        {
 | 
			
		||||
            if (_tableRule == null) return _table.DbName;
 | 
			
		||||
@@ -123,6 +145,18 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public string ToSql() => _whereTimes <= 0 ? null : new StringBuilder().Append("DELETE FROM ").Append(_commonUtils.QuoteSqlName(TableRuleInvoke())).Append(" WHERE ").Append(_where).ToString();
 | 
			
		||||
        public string ToSql()
 | 
			
		||||
        {
 | 
			
		||||
            if (_whereTimes <= 0) return null;
 | 
			
		||||
            var sb = new StringBuilder().Append("DELETE FROM ").Append(_commonUtils.QuoteSqlName(TableRuleInvoke())).Append(" WHERE ").Append(_where);
 | 
			
		||||
 | 
			
		||||
            if (_whereGlobalFilter.Any())
 | 
			
		||||
            {
 | 
			
		||||
                var globalFilterCondi = _commonExpression.GetWhereCascadeSql(new SelectTableInfo { Table = _table }, _whereGlobalFilter.Select(a => a.Where).ToList());
 | 
			
		||||
                if (string.IsNullOrEmpty(globalFilterCondi) == false)
 | 
			
		||||
                    sb.Append(" AND ").Append(globalFilterCondi);
 | 
			
		||||
            }
 | 
			
		||||
            return sb.ToString();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
        protected bool _distinct;
 | 
			
		||||
        protected Expression _selectExpression;
 | 
			
		||||
        protected List<LambdaExpression> _whereCascadeExpression = new List<LambdaExpression>();
 | 
			
		||||
        protected List<GlobalFilter.Item> _whereGlobalFilter;
 | 
			
		||||
 | 
			
		||||
        bool _isDisponse = false;
 | 
			
		||||
        ~Select0Provider()
 | 
			
		||||
@@ -50,6 +51,8 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _includeToList.Clear();
 | 
			
		||||
            _selectExpression = null;
 | 
			
		||||
            _whereCascadeExpression.Clear();
 | 
			
		||||
            _whereGlobalFilter = _orm.GlobalFilter.GetFilters();
 | 
			
		||||
            _whereCascadeExpression.AddRange(_whereGlobalFilter.Select(a => a.Where));
 | 
			
		||||
        }
 | 
			
		||||
        public static void CopyData(Select0Provider<TSelect, T1> from, object to, ReadOnlyCollection<ParameterExpression> lambParms)
 | 
			
		||||
        {
 | 
			
		||||
@@ -93,7 +96,8 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            toType.GetField("_includeToList", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(to, from._includeToList);
 | 
			
		||||
            toType.GetField("_distinct", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(to, from._distinct);
 | 
			
		||||
            toType.GetField("_selectExpression", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(to, from._selectExpression);
 | 
			
		||||
            toType.GetField("_whereMultiExpression", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(to, from._whereCascadeExpression);
 | 
			
		||||
            toType.GetField("_whereCascadeExpression", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(to, from._whereCascadeExpression);
 | 
			
		||||
            toType.GetField("_whereGlobalFilter", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(to, from._whereGlobalFilter);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public Select0Provider(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, object dywhere)
 | 
			
		||||
@@ -884,6 +888,25 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            if (parms != null) _params.AddRange(_commonUtils.GetDbParamtersByObject(sql, parms));
 | 
			
		||||
            return this as TSelect;
 | 
			
		||||
        }
 | 
			
		||||
        public TSelect DisableGlobalFilter(params string[] name)
 | 
			
		||||
        {
 | 
			
		||||
            if (_whereGlobalFilter.Any() == false) return this as TSelect;
 | 
			
		||||
            if (name?.Any() != true)
 | 
			
		||||
            {
 | 
			
		||||
                _whereCascadeExpression.RemoveRange(0, _whereGlobalFilter.Count);
 | 
			
		||||
                _whereGlobalFilter.Clear();
 | 
			
		||||
                return this as TSelect;
 | 
			
		||||
            }
 | 
			
		||||
            foreach (var n in name)
 | 
			
		||||
            {
 | 
			
		||||
                if (n == null) continue;
 | 
			
		||||
                var idx = _whereGlobalFilter.FindIndex(a => string.Compare(a.Name, n, true) == 0);
 | 
			
		||||
                if (idx == -1) continue;
 | 
			
		||||
                _whereCascadeExpression.RemoveAt(idx);
 | 
			
		||||
                _whereGlobalFilter.RemoveAt(idx);
 | 
			
		||||
            }
 | 
			
		||||
            return this as TSelect;
 | 
			
		||||
        }
 | 
			
		||||
        #region common
 | 
			
		||||
 | 
			
		||||
        protected TMember InternalAvg<TMember>(Expression exp) => this.ToList<TMember>($"avg({_commonExpression.ExpressionSelectColumn_MemberAccess(_tables, null, SelectTableInfoType.From, exp, true, null)})").FirstOrDefault();
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,8 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
    {
 | 
			
		||||
        public Select1Provider(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression, object dywhere) : base(orm, commonUtils, commonExpression, dywhere)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            _whereGlobalFilter = _orm.GlobalFilter.GetFilters();
 | 
			
		||||
            _whereCascadeExpression.AddRange(_whereGlobalFilter.Select(a => a.Where));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected ISelect<T1> InternalFrom(LambdaExpression lambdaExp)
 | 
			
		||||
@@ -575,7 +576,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
                foreach (var item in list)
 | 
			
		||||
                    setListValue(item, null);
 | 
			
		||||
 | 
			
		||||
                var subSelect = _orm.Select<TNavigate>().WithConnection(_connection).WithTransaction(_transaction).TrackToList(_trackToList) as Select1Provider<TNavigate>;
 | 
			
		||||
                var subSelect = _orm.Select<TNavigate>().DisableGlobalFilter().WithConnection(_connection).WithTransaction(_transaction).TrackToList(_trackToList) as Select1Provider<TNavigate>;
 | 
			
		||||
                if (_tableRules?.Any() == true)
 | 
			
		||||
                    foreach (var tr in _tableRules) subSelect.AsTable(tr);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
        protected TableInfo _table;
 | 
			
		||||
        protected Func<string, string> _tableRule;
 | 
			
		||||
        protected StringBuilder _where = new StringBuilder();
 | 
			
		||||
        protected List<GlobalFilter.Item> _whereGlobalFilter;
 | 
			
		||||
        protected StringBuilder _set = new StringBuilder();
 | 
			
		||||
        protected StringBuilder _setIncr = new StringBuilder();
 | 
			
		||||
        protected List<DbParameter> _params = new List<DbParameter>();
 | 
			
		||||
@@ -41,6 +42,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
			
		||||
            if (_orm.CodeFirst.IsAutoSyncStructure && typeof(T1) != typeof(object)) _orm.CodeFirst.SyncStructure<T1>();
 | 
			
		||||
            IgnoreCanUpdate();
 | 
			
		||||
            _whereGlobalFilter = _orm.GlobalFilter.GetFilters();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
@@ -63,6 +65,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            _params.Clear();
 | 
			
		||||
            _paramsSource.Clear();
 | 
			
		||||
            IgnoreCanUpdate();
 | 
			
		||||
            _whereGlobalFilter = _orm.GlobalFilter.GetFilters();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public IUpdate<T1> WithTransaction(DbTransaction transaction)
 | 
			
		||||
@@ -428,6 +431,24 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
        public IUpdate<T1> WhereExists<TEntity2>(ISelect<TEntity2> select, bool notExists = false) where TEntity2 : class => this.Where($"{(notExists ? "NOT " : "")}EXISTS({select.ToSql("1")})");
 | 
			
		||||
        public IUpdate<T1> WhereDynamic(object dywhere) => this.Where(_commonUtils.WhereObject(_table, "", dywhere));
 | 
			
		||||
 | 
			
		||||
        public IUpdate<T1> DisableGlobalFilter(params string[] name)
 | 
			
		||||
        {
 | 
			
		||||
            if (_whereGlobalFilter.Any() == false) return this;
 | 
			
		||||
            if (name?.Any() != true)
 | 
			
		||||
            {
 | 
			
		||||
                _whereGlobalFilter.Clear();
 | 
			
		||||
                return this;
 | 
			
		||||
            }
 | 
			
		||||
            foreach (var n in name)
 | 
			
		||||
            {
 | 
			
		||||
                if (n == null) continue;
 | 
			
		||||
                var idx = _whereGlobalFilter.FindIndex(a => string.Compare(a.Name, n, true) == 0);
 | 
			
		||||
                if (idx == -1) continue;
 | 
			
		||||
                _whereGlobalFilter.RemoveAt(idx);
 | 
			
		||||
            }
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected string WhereCaseSource(string CsName, Func<string, string> thenValue)
 | 
			
		||||
        {
 | 
			
		||||
            if (_source.Any() == false) return null;
 | 
			
		||||
@@ -611,6 +632,13 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
            if (_where.Length > 0)
 | 
			
		||||
                sb.Append(_source.Any() ? _where.ToString() : _where.ToString().Substring(5));
 | 
			
		||||
 | 
			
		||||
            if (_whereGlobalFilter.Any())
 | 
			
		||||
            {
 | 
			
		||||
                var globalFilterCondi = _commonExpression.GetWhereCascadeSql(new SelectTableInfo { Table = _table }, _whereGlobalFilter.Select(a => a.Where).ToList());
 | 
			
		||||
                if (string.IsNullOrEmpty(globalFilterCondi) == false)
 | 
			
		||||
                    sb.Append(" AND ").Append(globalFilterCondi);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (_table.VersionColumn != null)
 | 
			
		||||
            {
 | 
			
		||||
                var versionCondi = WhereCaseSource(_table.VersionColumn.CsName, sqlval => sqlval);
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,6 @@ namespace FreeSql.Internal
 | 
			
		||||
            {
 | 
			
		||||
                if (!string.IsNullOrEmpty(trytb.Name)) attr.Name = trytb.Name;
 | 
			
		||||
                if (!string.IsNullOrEmpty(trytb.OldName)) attr.OldName = trytb.OldName;
 | 
			
		||||
                if (!string.IsNullOrEmpty(trytb.SelectFilter)) attr.SelectFilter = trytb.SelectFilter;
 | 
			
		||||
                if (trytb._DisableSyncStructure != null) attr._DisableSyncStructure = trytb.DisableSyncStructure;
 | 
			
		||||
            }
 | 
			
		||||
            var attrs = type.GetCustomAttributes(typeof(TableAttribute), false);
 | 
			
		||||
@@ -95,12 +94,10 @@ namespace FreeSql.Internal
 | 
			
		||||
                if (tryattr == null) continue;
 | 
			
		||||
                if (!string.IsNullOrEmpty(tryattr.Name)) attr.Name = tryattr.Name;
 | 
			
		||||
                if (!string.IsNullOrEmpty(tryattr.OldName)) attr.OldName = tryattr.OldName;
 | 
			
		||||
                if (!string.IsNullOrEmpty(tryattr.SelectFilter)) attr.SelectFilter = tryattr.SelectFilter;
 | 
			
		||||
                if (tryattr._DisableSyncStructure != null) attr._DisableSyncStructure = tryattr.DisableSyncStructure;
 | 
			
		||||
            }
 | 
			
		||||
            if (!string.IsNullOrEmpty(attr.Name)) return attr;
 | 
			
		||||
            if (!string.IsNullOrEmpty(attr.OldName)) return attr;
 | 
			
		||||
            if (!string.IsNullOrEmpty(attr.SelectFilter)) return attr;
 | 
			
		||||
            if (attr._DisableSyncStructure != null) return attr;
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										43
									
								
								FreeSql/Internal/GlobalFilter.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								FreeSql/Internal/GlobalFilter.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Concurrent;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Linq.Expressions;
 | 
			
		||||
using System.Text;
 | 
			
		||||
 | 
			
		||||
namespace FreeSql.Internal
 | 
			
		||||
{
 | 
			
		||||
    public class GlobalFilter
 | 
			
		||||
    {
 | 
			
		||||
        ConcurrentDictionary<string, Item> _filters = new ConcurrentDictionary<string, Item>(StringComparer.CurrentCultureIgnoreCase);
 | 
			
		||||
        int _id = 0;
 | 
			
		||||
 | 
			
		||||
        public class Item
 | 
			
		||||
        {
 | 
			
		||||
            public int Id { get; internal set; }
 | 
			
		||||
            public string Name { get; internal set; }
 | 
			
		||||
            public LambdaExpression Where { get; internal set; }
 | 
			
		||||
        }
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 创建一个过滤器
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <typeparam name="TEntity"></typeparam>
 | 
			
		||||
        /// <param name="name">名字</param>
 | 
			
		||||
        /// <param name="where">表达式</param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        public GlobalFilter Apply<TEntity>(string name, Expression<Func<TEntity, bool>> where)
 | 
			
		||||
        {
 | 
			
		||||
            if (name == null) throw new ArgumentNullException(nameof(name));
 | 
			
		||||
            if (where == null) return this;
 | 
			
		||||
 | 
			
		||||
            _filters.TryGetValue(name, out var item);
 | 
			
		||||
            if (item == null) item = new Item { Id = ++_id, Name = name };
 | 
			
		||||
            item.Where = where;
 | 
			
		||||
            _filters.AddOrUpdate(name, item, (_, __) => item);
 | 
			
		||||
            return this;
 | 
			
		||||
        }
 | 
			
		||||
        public void Remove(string name) => _filters.TryRemove(name ?? throw new ArgumentNullException(nameof(name)), out var _);
 | 
			
		||||
 | 
			
		||||
        public List<Item> GetFilters() => _filters.Values.OrderBy(a => a.Id).ToList();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -21,7 +21,6 @@ namespace FreeSql.Internal.Model
 | 
			
		||||
        public string CsName { get; set; }
 | 
			
		||||
        public string DbName { get; set; }
 | 
			
		||||
        public string DbOldName { get; set; }
 | 
			
		||||
        public string SelectFilter { get; set; }
 | 
			
		||||
        public bool DisableSyncStructure { get; set; }
 | 
			
		||||
 | 
			
		||||
        public ColumnInfo VersionColumn { get; set; }
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,6 @@ namespace FreeSql.Internal
 | 
			
		||||
                trytb.DbName = trytb.DbName.ToUpper();
 | 
			
		||||
                trytb.DbOldName = trytb.DbOldName?.ToUpper();
 | 
			
		||||
            }
 | 
			
		||||
            trytb.SelectFilter = tbattr?.SelectFilter;
 | 
			
		||||
            if (tbattr != null) trytb.DisableSyncStructure = tbattr.DisableSyncStructure;
 | 
			
		||||
            var propsLazy = new List<(PropertyInfo, bool, bool)>();
 | 
			
		||||
            var propsNavObjs = new List<PropertyInfo>();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user