From 070b9a1e66961a513814c7b840377a5c719f017d Mon Sep 17 00:00:00 2001 From: 28810 <28810@YEXIANGQIN> Date: Mon, 28 Sep 2020 03:11:33 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=20=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=A1=A8=E8=BE=BE=E5=BC=8F=E6=A0=91=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=BC=80=E6=94=BE(=E9=9D=9E=E5=85=AC?= =?UTF-8?q?=E5=BC=80)=E5=86=85=E9=83=A8=E5=85=AC=E5=85=B1=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB=20Utility.CommonUtils=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FreeSql/DataAnnotations/ExpressionCallAttribute.cs | 7 ++++++- FreeSql/FreeSql.xml | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/FreeSql/DataAnnotations/ExpressionCallAttribute.cs b/FreeSql/DataAnnotations/ExpressionCallAttribute.cs index 6970eca9..85daa395 100644 --- a/FreeSql/DataAnnotations/ExpressionCallAttribute.cs +++ b/FreeSql/DataAnnotations/ExpressionCallAttribute.cs @@ -85,6 +85,11 @@ namespace FreeSql.DataAnnotations /// /// string ParseExpression(Expression exp); + + /// + /// (非公开)内部公共工具类方法 + /// + 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; } } } diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml index 330dc4ac..4cea215e 100644 --- a/FreeSql/FreeSql.xml +++ b/FreeSql/FreeSql.xml @@ -292,6 +292,11 @@ + + + (非公开)内部公共工具类方法 + + 索引设置,如:[Index("{tablename}_idx_01", "name")]