public static TreeItemDto FromBase(Relation relation, AllDb db)
 {
     return new RelationDto(db)
     {
         Id = relation.Id,
         Caption = GetCaption(relation),
         IsClosed = true
     };
 }
 public static string GetCaption(Relation relation)
 {
     return string.Format("{0} {1} {2}", relation.FirstBlock.Caption, relation.Type.Caption,
         relation.SecondBlock.Caption);
 }