public void Add(TreeDimensionDto treeDimension)
 {
     if (treeDimension.ParentId == null)
     {
         RootDimensions.Add(treeDimension);
     }
     else
     {
         var parentDimension = GetDimensionDto(treeDimension.ParentId.Value);
         if (parentDimension.Children == null)
         {
             parentDimension.Children = new List <TreeDimensionDto>();
         }
         parentDimension.Children.Add(treeDimension);
     }
 }
 public bool Contains(TreeDimensionDto treeDimension)
 {
     return(Contains(treeDimension.Id));
 }