diff --git a/AOP.md b/AOP.md index 56e6625..7b66f66 100644 --- a/AOP.md +++ b/AOP.md @@ -151,6 +151,21 @@ fsql.Aop.ParseExpression += (s, e) => 这个解析有点复杂,当 e.Expression 很复杂的时候,我们还提供了 e.FreeParse 方法,使用它相当于调用 FreeSql 内置表达式解析引擎,辅助您进行解析。 +## 修改decimal默认特性 +因为默认(10,2),太小,我们可以全局修改decimal类型的支持范围,支持decimal(18,6) +``` + + fsql1.Aop.ConfigEntityProperty += (s, e) => + { + if (e.Property.PropertyType == typeof(decimal)|| e.Property.PropertyType == typeof(decimal?)) + { + e.ModifyResult.Precision = 18; + e.ModifyResult.Scale = 6; + } + }; + +``` + ## 参考资料 - [《数据库事务》](%e4%ba%8b%e5%8a%a1)