public void UnmapViewComponents(View view) { View readView = ViewDao.FindById(view.Id); // Remove all maps for the ViewNodes connected to the View IList <ViewNode> viewNodeList = ViewNodeDao.FindAllByViewId(readView.Id); foreach (ViewNode viewNode in viewNodeList) { // Delete the ViewMap if (viewNode.ViewMap != null) { PropertyMapDao.Delete(viewNode.ViewMap); } // Remove ViewMap from the ViewNode viewNode.ViewMap = null; // Save ViewNode ViewNodeDao.SaveOrUpdate(viewNode); } // Remove the connections from ViewComponents to MappedProperty WalkViewComponentsAndUnmap(readView.VisualTree); }
public IList <ViewNode> GetViewNodesByViewId(Guid viewId) { return(ViewNodeDao.FindAllByViewId(viewId)); }