@@ -119,7 +119,7 @@ async Task HandleUserChangeAsync(UserProfile profile, ChangeType _, Cancellation
119119 // - Shopping cart operations: BookAddedToCart, BookRemovedFromCart, CartItemQuantityUpdated, ShoppingCartCleared
120120 // "UserUpdated" is a good catch-all for ReactiveQuery invalidation.
121121
122- IDomainEventNotification notification = new UserUpdatedNotification ( profile . Id , timestamp ) ;
122+ IDomainEventNotification notification = new UserUpdatedNotification ( Guid . Empty , profile . Id , timestamp ) ;
123123
124124 await NotifyAsync ( "User" , notification , token ) ;
125125 }
@@ -134,9 +134,9 @@ async Task HandleCategoryChangeAsync(CategoryProjection category, ChangeType cha
134134 var name = category . Names . Values . FirstOrDefault ( ) ?? "Unknown" ;
135135 IDomainEventNotification notification = effectiveChangeType switch
136136 {
137- ChangeType . Insert => new CategoryCreatedNotification ( category . Id , name , category . LastModified ) ,
138- ChangeType . Update => new CategoryUpdatedNotification ( category . Id , category . LastModified ) ,
139- ChangeType . Delete => new CategoryDeletedNotification ( category . Id , category . LastModified ) ,
137+ ChangeType . Insert => new CategoryCreatedNotification ( Guid . Empty , category . Id , name , category . LastModified ) ,
138+ ChangeType . Update => new CategoryUpdatedNotification ( Guid . Empty , category . Id , category . LastModified ) ,
139+ ChangeType . Delete => new CategoryDeletedNotification ( Guid . Empty , category . Id , category . LastModified ) ,
140140 _ => throw new ArgumentOutOfRangeException ( nameof ( effectiveChangeType ) )
141141 } ;
142142
@@ -153,9 +153,9 @@ async Task HandleBookChangeAsync(BookSearchProjection book, ChangeType changeTyp
153153 var timestamp = DateTimeOffset . UtcNow ;
154154 IDomainEventNotification notification = effectiveChangeType switch
155155 {
156- ChangeType . Insert => new BookCreatedNotification ( book . Id , book . Title , timestamp ) ,
157- ChangeType . Update => new BookUpdatedNotification ( book . Id , book . Title , timestamp ) ,
158- ChangeType . Delete => new BookDeletedNotification ( book . Id , timestamp ) ,
156+ ChangeType . Insert => new BookCreatedNotification ( Guid . Empty , book . Id , book . Title , timestamp ) ,
157+ ChangeType . Update => new BookUpdatedNotification ( Guid . Empty , book . Id , book . Title , timestamp ) ,
158+ ChangeType . Delete => new BookDeletedNotification ( Guid . Empty , book . Id , timestamp ) ,
159159 _ => throw new ArgumentOutOfRangeException ( nameof ( effectiveChangeType ) )
160160 } ;
161161
@@ -170,9 +170,9 @@ async Task HandleAuthorChangeAsync(AuthorProjection author, ChangeType changeTyp
170170
171171 IDomainEventNotification notification = effectiveChangeType switch
172172 {
173- ChangeType . Insert => new AuthorCreatedNotification ( author . Id , author . Name , author . LastModified ) ,
174- ChangeType . Update => new AuthorUpdatedNotification ( author . Id , author . Name , author . LastModified ) ,
175- ChangeType . Delete => new AuthorDeletedNotification ( author . Id , author . LastModified ) ,
173+ ChangeType . Insert => new AuthorCreatedNotification ( Guid . Empty , author . Id , author . Name , author . LastModified ) ,
174+ ChangeType . Update => new AuthorUpdatedNotification ( Guid . Empty , author . Id , author . Name , author . LastModified ) ,
175+ ChangeType . Delete => new AuthorDeletedNotification ( Guid . Empty , author . Id , author . LastModified ) ,
176176 _ => throw new ArgumentOutOfRangeException ( nameof ( effectiveChangeType ) )
177177 } ;
178178
@@ -187,9 +187,9 @@ async Task HandlePublisherChangeAsync(PublisherProjection publisher, ChangeType
187187
188188 IDomainEventNotification notification = effectiveChangeType switch
189189 {
190- ChangeType . Insert => new PublisherCreatedNotification ( publisher . Id , publisher . Name , publisher . LastModified ) ,
191- ChangeType . Update => new PublisherUpdatedNotification ( publisher . Id , publisher . Name , publisher . LastModified ) ,
192- ChangeType . Delete => new PublisherDeletedNotification ( publisher . Id , publisher . LastModified ) ,
190+ ChangeType . Insert => new PublisherCreatedNotification ( Guid . Empty , publisher . Id , publisher . Name , publisher . LastModified ) ,
191+ ChangeType . Update => new PublisherUpdatedNotification ( Guid . Empty , publisher . Id , publisher . Name , publisher . LastModified ) ,
192+ ChangeType . Delete => new PublisherDeletedNotification ( Guid . Empty , publisher . Id , publisher . LastModified ) ,
193193 _ => throw new ArgumentOutOfRangeException ( nameof ( effectiveChangeType ) )
194194 } ;
195195
@@ -202,7 +202,7 @@ async Task HandleBookStatisticsChangeAsync(BookStatistics stats, ChangeType _, C
202202
203203 // Emit BookUpdated so clients refetch the book (including new stats)
204204 // Title is unknown here, but usually not critical for simple invalidation signals
205- IDomainEventNotification notification = new BookUpdatedNotification ( stats . Id , "Statistics Updated" , DateTimeOffset . UtcNow ) ;
205+ IDomainEventNotification notification = new BookUpdatedNotification ( Guid . Empty , stats . Id , "Statistics Updated" , DateTimeOffset . UtcNow ) ;
206206
207207 await NotifyAsync ( "Book" , notification , token ) ;
208208 }
0 commit comments