mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-07 08:50:52 +08:00
Updated AOP (markdown)
15
AOP.md
15
AOP.md
@@ -151,6 +151,21 @@ fsql.Aop.ParseExpression += (s, e) =>
|
|||||||
|
|
||||||
这个解析有点复杂,当 e.Expression 很复杂的时候,我们还提供了 e.FreeParse 方法,使用它相当于调用 FreeSql 内置表达式解析引擎,辅助您进行解析。
|
这个解析有点复杂,当 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)
|
- [《数据库事务》](%e4%ba%8b%e5%8a%a1)
|
||||||
|
|||||||
Reference in New Issue
Block a user