Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the AbpEntityChangeOptions. #19901

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)