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