You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-ui-builder/advanced/events.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ builder.CreateUmbracoBuilder()
40
40
Raised when the repository `Save` method is called and before the entity has been persisted. The notification contains an `Entity` property with `Before` and `After` inner properties. These properties provide access to a copy of the currently persisted entity (or null if a new entity) and the updated entity that´s saved.
41
41
Changes can be made to the `After` entity and they will be persisted as part of the save operation. If the `Cancel` property of the notification is set to `true` then the save operation will be canceled and no changes will be saved.
@@ -72,7 +72,7 @@ public class MyEntitySavedEventHandler : INotificationHandler<EntitySavedNotifi
72
72
}
73
73
74
74
}
75
-
````
75
+
```
76
76
77
77
### **EntityDeletingNotification**
78
78
@@ -97,7 +97,7 @@ public class MyEntityDeletingEventHandler : INotificationHandler<EntityDeleting
97
97
98
98
Raised when the repository `Delete` method is called and **after** the entity has been deleted. The notification contains an `Entity` property providing access to a copy of the entity that´s deleted.
@@ -110,13 +110,13 @@ public class MyEntityDeletedEventHandler : INotificationHandler<EntityDeletedNo
110
110
}
111
111
112
112
}
113
-
````
113
+
```
114
114
115
115
### **SqlQueryBuildingNotification**
116
116
117
117
Raised when the repository is **preparing** a SQL query. The notification contains the collection alias + type, the NPoco `Sql<ISqlContext>` object, and the where clause/order by clauses. These will be used to generate the SQL query.
@@ -126,13 +126,13 @@ public class MySqlQueryBuildingEventHandler : INotificationHandler<SqlQueryBuil
126
126
}
127
127
128
128
}
129
-
````
129
+
```
130
130
131
131
### **SqlQueryBuiltNotification**
132
132
133
133
Raised when the repository has **repaired** a SQL query. The notification contains the collection alias + type, the NPoco `Sql<ISqlContext>` object and the where clause/order by clauses that was used to generate the SQL query.
@@ -142,13 +142,13 @@ public class MySqlQueryBuiltEventHandler : INotificationHandler<SqlQueryBuiltNo
142
142
}
143
143
144
144
}
145
-
````
145
+
```
146
146
147
147
## Repository events validation
148
148
149
149
Starting with version `15.1.0`, complex server-side validation can be added to a collection by calling the `CancelOperation` method of the notification.
0 commit comments