mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
ac1a0950e5
commit
7c6c58ceff
@ -24,5 +24,21 @@ namespace SqlSugar
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static IEnumerable<SplitTableInfo> ContainsTableNamesIfNullDefaultFirst(this List<SplitTableInfo> tables, params string[] tableNames)
|
||||
{
|
||||
List<SplitTableInfo> result = new List<SplitTableInfo>();
|
||||
foreach (var item in tables)
|
||||
{
|
||||
if (tableNames.Any(it => item.TableName.ObjToString().ToLower().Contains(it.ObjToString().ToLower())))
|
||||
{
|
||||
result.Add(item);
|
||||
}
|
||||
}
|
||||
if (!result.Any()&& tables.Any())
|
||||
{
|
||||
result.Add(tables.First());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user