private async Task NotifyEntitiesUpdate(IEnumerable <TEntity> entities) { foreach (var entity in entities) { await _commandsHelper.PublishEntityEvent(new EntityUpdatedEvent { EntityId = _commandsHelper.GetEntityId(entity), }); } }
private async Task NotifyEntitiesCreation(IEnumerable <object> entities, EntityNode parent) { foreach (var entity in entities) { await _commandsHelper.PublishEntityEvent(new EntityCreatedEvent { EntityId = _commandsHelper.GetEntityId(entity), ParentId = parent?.EntityId ?? Guid.Empty, }); } }
private async Task NotifyEntitiesDeletion(IEnumerable <EntityNode> nodes) { foreach (var node in nodes) { await _commandsHelper.PublishEntityEvent(new EntityDeletedEvent { EntityId = node.EntityId, ParentId = node.ParentId, }); } }