- 增加 IFreeSql.GlobalFilter 全局过滤器;

- 移除 TableAttribute.SelectFilter 功能;
This commit is contained in:
28810
2019-10-24 02:17:22 +08:00
parent 5b0b678c27
commit b97156b482
46 changed files with 271 additions and 148 deletions

View File

@ -105,12 +105,6 @@ namespace FreeSql.SqlServer.Curd
if (!string.IsNullOrEmpty(_tables[0].Cascade))
sbnav.Append(" AND (").Append(_tables[0].Cascade).Append(")");
foreach (var tb in _tables)
{
if (tb.Type == SelectTableInfoType.Parent) continue;
if (string.IsNullOrEmpty(tb.Table.SelectFilter) == false)
sbnav.Append(" AND (").Append(tb.Table.SelectFilter.Replace("a.", $"{tb.Alias}.")).Append(")");
}
if (sbnav.Length > 0)
{
sb.Append(" \r\nWHERE ").Append(sbnav.Remove(0, 5));
@ -211,12 +205,6 @@ namespace FreeSql.SqlServer.Curd
if (!string.IsNullOrEmpty(_tables[0].Cascade))
sbnav.Append(" AND (").Append(_tables[0].Cascade).Append(")");
foreach (var tb in _tables)
{
if (tb.Type == SelectTableInfoType.Parent) continue;
if (string.IsNullOrEmpty(tb.Table.SelectFilter) == false)
sbnav.Append(" AND (").Append(tb.Table.SelectFilter.Replace("a.", $"{tb.Alias}.")).Append(")");
}
if (sbnav.Length > 0)
{
sb.Append(" \r\nWHERE ").Append(sbnav.Remove(0, 5));