Skip to content

Commit

Permalink
Document the AbpEntityChangeOptions.
Browse files Browse the repository at this point in the history
Resolve #19894
  • Loading branch information
maliming committed May 22, 2024
1 parent 928ed0b commit 6fd0d90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/en/Local-Event-Bus.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ Pre-build events are published when you save changes to the database;
* For EF Core, they are published on `DbContext.SaveChanges`.
* For MongoDB, they are published when you call repository's `InsertAsync`, `UpdateAsync` or `DeleteAsync` methods (since MongoDB has not a change tracking system).

#### AbpEntityChangeOptions

There is a `PublishEntityUpdatedEventWhenNavigationChanges` option in the `AbpEntityChangeOptions` class with a default value of `true`.
If you set it to `false`, the `EntityUpdatedEventData<T>` will not be published when a navigation property changes.

> This option is only used for the EF Core.
## See Also

* [Distributed Event Bus](Distributed-Event-Bus.md)
8 changes: 8 additions & 0 deletions docs/zh-Hans/Local-Event-Bus.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ namespace AbpDemo
* 对于 EF Core, 他们在 `DbContext.SaveChanges` 发布.
* 对于 MongoDB, 在你调用仓储的 `InsertAsync`, `UpdateAsync``DeleteAsync` 方法发布(因为MongoDB没有更改追踪系统).


#### AbpEntityChangeOptions

`AbpEntityChangeOptions`类中有一个`PublishEntityUpdatedEventWhenNavigationChanges`选项,默认值为`true`
如果将其设置为`false`,则当导航属性更改时,将不会发布`EntityUpdatedEventData<T>`事件。

> 此选项仅用于EF Core
## 另请参阅

* [分布式事件总线](Distributed-Event-Bus.md)

0 comments on commit 6fd0d90

Please sign in to comment.