public virtual object Clone() { liteTagItem clone = BaseClone(); if (Translations != null) { clone.Translations = Translations.Where(t => t.Deleted == BaseStatusDeleted.None).Select(t => (liteTagTranslation)t.Clone()).ToList(); } if (CommunityAssignments != null) { clone.CommunityAssignments = CommunityAssignments.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => (liteCommunityTag)c.Clone()).ToList(); } if (Organizations != null) { clone.Organizations = Organizations.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => (liteOrganizationAvailability)c.Clone()).ToList(); } clone.IdTile = IdTile; return(clone); }
//public object Clone() //{ // TagItem tag = BaseClone(); // if (Translations != null) // tag.Translations = Translations.Where(t => t.Deleted == BaseStatusDeleted.None).Select(t => (lm.Comol.Core.DomainModel.Languages.)t.Clone()).ToList(); // if (CommunityAssignments!=null) // tag.CommunityAssignments = CommunityAssignments.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => (CommunityTag)c.Clone()).ToList(); // if (tag.MyTile != null) // tag.MyTile = (lm.Comol.Core.Dashboard.Domain.Tile)MyTile.Clone(); // return tag; //} public virtual TagItem Copy(litePerson person, String ipAddress, String proxyIpAddress, String titlePrefix = "") { TagItem clone = BaseClone(); clone.CreateMetaInfo(person, ipAddress, proxyIpAddress); if (Translations != null) { clone.Translations = Translations.Where(t => t.Deleted == BaseStatusDeleted.None).Select(t => t.Copy(clone, person, ipAddress, proxyIpAddress, titlePrefix, clone.CreatedOn)).ToList(); } if (CommunityAssignments != null) { clone.CommunityAssignments = CommunityAssignments.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => c.Copy(clone, person, ipAddress, proxyIpAddress, clone.CreatedOn)).ToList(); } if (Organizations != null) { clone.Organizations = Organizations.Where(c => c.Deleted == BaseStatusDeleted.None).Select(c => c.Copy(clone, person, ipAddress, proxyIpAddress, clone.CreatedOn)).ToList(); } if (MyTile != null) { clone.MyTile = MyTile.Copy(clone, person, ipAddress, proxyIpAddress, titlePrefix, clone.CreatedOn); } return(clone); }