public DiagramViewModel(IGraphData diagram) { if (diagram == null) throw new Exception("Diagram not found"); CurrentRepository = diagram.Repository; DataObject = diagram; }