mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-03-18 03:50:58 +08:00
update
11
AOP.md
11
AOP.md
@@ -107,6 +107,17 @@ class MyColumnAttribute : Attribute {
|
||||
}
|
||||
```
|
||||
|
||||
## Ado.net 读取拦截
|
||||
|
||||
```csharp
|
||||
fsql.Aop.AuditDataReader += (_, e) =>
|
||||
{
|
||||
if (e.DataReader.GetFieldType(e.Index) == typeof(string) &&
|
||||
e.Value == DBNull.Value)
|
||||
e.Value = "";
|
||||
};
|
||||
```
|
||||
|
||||
## 表达式拦截
|
||||
|
||||
FreeSql 内部表达式支持非常丰富,对各大数据库的兼容度也做得很好。
|
||||
|
||||
Reference in New Issue
Block a user