/// <summary> /// Convert model class to database objcets. /// </summary> /// <returns></returns> public CategoryPeerSetDTO ToDto() { var result = new CategoryPeerSetDTO(); foreach (var c in _Children) { result.Children.Add(c.ToDto()); } foreach (var c2 in _Parents) { result.Parents.Add(c2.ToDto()); } foreach (var c3 in _Peers) { result.Peers.Add(c3.ToDto()); } return(result); }
public CategoryPeerSetDTO ToDto() { CategoryPeerSetDTO result = new CategoryPeerSetDTO(); foreach (CategorySnapshot c in this._Children) { result.Children.Add(c.ToDto()); } foreach (CategorySnapshot c2 in this._Parents) { result.Parents.Add(c2.ToDto()); } foreach (CategorySnapshot c3 in this._Peers) { result.Peers.Add(c3.ToDto()); } return(result); }