public void AddGraph(IGraphData data) { if (Graphs.All(p => p.Identifier != data.Identifier)) { var workspaceGraph = new WorkspaceGraph { GraphId = data.Identifier, WorkspaceId = Identifier }; Repository.Add(workspaceGraph); } }
public IGraphData CreateGraph(Type to) { var graph = Activator.CreateInstance(to) as IGraphData; graph.Name = string.Format("{0}Graph", to.Name); Repository.Add(graph); var workspaceGraph = new WorkspaceGraph { GraphId = graph.Identifier, WorkspaceId = Identifier }; Repository.Add(workspaceGraph); return(graph); }
public IGraphData CreateGraph(Type to) { var graph = Activator.CreateInstance(to) as IGraphData; graph.Name = string.Format("{0}Graph", to.Name); Repository.Add(graph); var workspaceGraph = new WorkspaceGraph { GraphId = graph.Identifier, WorkspaceId = Identifier }; Repository.Add(workspaceGraph); return graph; }