mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
- 优化 自定义表达式树解析时,开放(非公开)内部公共工具类 Utility.CommonUtils;
This commit is contained in:
parent
3ba1e649e9
commit
070b9a1e66
@ -85,6 +85,11 @@ namespace FreeSql.DataAnnotations
|
|||||||
/// <param name="exp"></param>
|
/// <param name="exp"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
string ParseExpression(Expression exp);
|
string ParseExpression(Expression exp);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// (非公开)内部公共工具类方法
|
||||||
|
/// </summary>
|
||||||
|
CommonUtils CommonUtils { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
class DefaultUtility : IUtility
|
class DefaultUtility : IUtility
|
||||||
@ -92,8 +97,8 @@ namespace FreeSql.DataAnnotations
|
|||||||
internal ExpressionCallContext _context;
|
internal ExpressionCallContext _context;
|
||||||
|
|
||||||
public TableInfo GetTableByEntity(Type entityType) => _context?._commonExp._common.GetTableByEntity(entityType);
|
public TableInfo GetTableByEntity(Type entityType) => _context?._commonExp._common.GetTableByEntity(entityType);
|
||||||
|
|
||||||
public string ParseExpression(Expression exp) => _context?._commonExp.ExpressionLambdaToSql(exp, _context._tsc.CloneDisableDiyParse());
|
public string ParseExpression(Expression exp) => _context?._commonExp.ExpressionLambdaToSql(exp, _context._tsc.CloneDisableDiyParse());
|
||||||
|
public CommonUtils CommonUtils => _context?._commonExp._common;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -292,6 +292,11 @@
|
|||||||
<param name="exp"></param>
|
<param name="exp"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:FreeSql.DataAnnotations.ExpressionCallContext.IUtility.CommonUtils">
|
||||||
|
<summary>
|
||||||
|
(非公开)内部公共工具类方法
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:FreeSql.DataAnnotations.IndexAttribute">
|
<member name="T:FreeSql.DataAnnotations.IndexAttribute">
|
||||||
<summary>
|
<summary>
|
||||||
索引设置,如:[Index("{tablename}_idx_01", "name")]
|
索引设置,如:[Index("{tablename}_idx_01", "name")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user