public void DeleteConnector(List <HierarchicalDetail> data) { foreach (HierarchicalDetail hdata in data) { HierarchicalDetail originalData = DiagramContext.HierarchicalDetails.Single(h => h.Name == hdata.Name); DiagramContext.HierarchicalDetails.DeleteOnSubmit(originalData); DiagramContext.SubmitChanges(); } }
public void UpdateConnector(List <HierarchicalDetail> data) { foreach (HierarchicalDetail hdata in data) { HierarchicalDetail originalData = DiagramContext.HierarchicalDetails.Single(h => h.Name == hdata.Name); originalData.SourceNode = hdata.SourceNode; originalData.TargetNode = hdata.TargetNode; DiagramContext.SubmitChanges(); } }