diff --git a/Structurizr.Core/View/ViewSet.cs b/Structurizr.Core/View/ViewSet.cs index ce13ca2..179f712 100644 --- a/Structurizr.Core/View/ViewSet.cs +++ b/Structurizr.Core/View/ViewSet.cs @@ -349,8 +349,8 @@ public void Hydrate() foreach (ComponentView view in _componentViews) { - view.SoftwareSystem = Model.GetSoftwareSystemWithId(view.SoftwareSystemId); - view.Container = view.SoftwareSystem.GetContainerWithId(view.ContainerId); + view.Container = (Container)Model.GetElement(view.ContainerId); + view.SoftwareSystem = view.Container.SoftwareSystem; HydrateView(view); }