mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-10 10:20:55 +08:00
Updated AOP (markdown)
11
AOP.md
11
AOP.md
@@ -91,6 +91,17 @@ fsql.Aop.SyncStructureBefore、fsql.Aop.SyncStructureAfter 这两个事件将排
|
||||
|
||||
## ConfigEntityProperty
|
||||
|
||||
### 统一设置架构
|
||||
|
||||
```csharp
|
||||
//提前设置 FreeSqlBuilder AOP 优先级
|
||||
//UseMappingPriority(MappingPriorityType.Attribute, MappingPriorityType.FluentApi, MappingPriorityType.Aop)
|
||||
|
||||
fsql.Aop.ConfigEntity += (s, e) => {
|
||||
e.ModifyResult.Name = "public." + e.ModifyResult.Name;
|
||||
};
|
||||
```
|
||||
|
||||
### MySql Enum 映射
|
||||
|
||||
默认情况 c# 枚举会映射为 MySql Enum 类型,如果想映射为 int 在 FreeSqlBuilder Build 之后执行以下 Aop 统一处理:
|
||||
|
||||
Reference in New Issue
Block a user