mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Code optimization
This commit is contained in:
@@ -14,7 +14,15 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
if (_Filters == null)
|
if (_Filters == null)
|
||||||
_Filters = new List<SqlFilterItem>();
|
_Filters = new List<SqlFilterItem>();
|
||||||
_Filters.Add(filter);
|
if (this.Context.CurrentConnectionConfig.IsShardSameThread)
|
||||||
|
{
|
||||||
|
if (!_Filters.Select(it => it.FilterValue(this.Context).Sql).Contains(filter.FilterValue(this.Context).Sql))
|
||||||
|
_Filters.Add(filter);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_Filters.Add(filter);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user