hi all.
I have a tree structure of Folders (parent child) and each folder can
be tagged with a tag (Tags collection of Folder).
That's all fine ..
Now I would like that all children folders have the same tags as the
parent ... Basically I just need to point the Tags collection to the
one of the parents tags
Code:
public virtual IList<Tag> Tags {
get {
if (IsChild) {
return Parent.Tags;
} else {
return _tags;
}
}
set {
if (IsChild) {
_tags = Parent.Tags;
} else {
_tags = value;
}
}
}
The problem is that this does not work and i am getting:
Found shared references to a collection:
ITAssessments.Core.Domain.Folder.Tags
That is correct but I would like to know how to model that correctly
so that child folder can share the same tags as the parent. Thanks for
digging into !