From 425c281c34c2a7b51dde064b8a6be57cd83c14d2 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Thu, 8 Dec 2022 20:54:50 +0800 Subject: [PATCH] Fix Distributed-Event-Bus.md --- docs/en/Distributed-Event-Bus.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/en/Distributed-Event-Bus.md b/docs/en/Distributed-Event-Bus.md index a3c1237cd7..9664458aae 100644 --- a/docs/en/Distributed-Event-Bus.md +++ b/docs/en/Distributed-Event-Bus.md @@ -536,13 +536,18 @@ public class BlogUserSynchronizer : EntitySynchronizer, Developers should always handle the distributed events disordering. ABP framework has an `EntityVersion` audit property to avoid an old version of entity data overriding a new one. -The only thing we need to do is make the entity implement the `IHasEntityVersion` interface. +The only thing we need to do is make the entity class and the ETO class implement the `IHasEntityVersion` interface. ```csharp public class User : Entity, IHasEntityVersion { public int EntityVersion { get; set; } } + +public class UserEto : EntityEto, IHasEntityVersion +{ + public int EntityVersion { get; set; } +} ``` After that, the entity synchronizer will know the entity version number and skip handling the stale events.