mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 02:14:53 +08:00
Optimization tip
This commit is contained in:
@@ -1922,8 +1922,15 @@ namespace SqlSugar
|
|||||||
return reslut;
|
return reslut;
|
||||||
}
|
}
|
||||||
protected ISugarQueryable<T> _As(string tableName, string entityName)
|
protected ISugarQueryable<T> _As(string tableName, string entityName)
|
||||||
|
{
|
||||||
|
if (this.QueryBuilder.AsTables != null && this.QueryBuilder.AsTables.Any(it => it.Key == entityName))
|
||||||
|
{
|
||||||
|
Check.Exception(true, ErrorMessage.GetThrowMessage($"use As<{tableName}>(\"{tableName}\")", $"请把 As(\"{tableName}\"), 改成 As<{tableName}实体>(\"{tableName}\")"));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.QueryBuilder.AsTables.Add(entityName, tableName);
|
this.QueryBuilder.AsTables.Add(entityName, tableName);
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
protected void _Filter(string FilterName, bool isDisabledGobalFilter)
|
protected void _Filter(string FilterName, bool isDisabledGobalFilter)
|
||||||
|
|||||||
Reference in New Issue
Block a user