public void Update(T entity) { var newEvents = entity.FetchEvents(); _EventStream.AppendEvents(entity.Id, newEvents); if (entity is IEntityProperties entityWithProperties) { var properties = entityWithProperties.GetProperties(); _EventStream.UpdateProperties(entity.Id, properties); } }