Ejemplo n.º 1
0
        public override TagUsage Move(Tag target)
        {
            ParamIs.NotNull(() => target);

            if (target.Equals(Tag))
            {
                return(this);
            }

            // TODO: have to make a clone because of NH reparenting issues, see http://stackoverflow.com/questions/28114508/nhibernate-change-parent-deleted-object-would-be-re-saved-by-cascade
            Tag.AllArtistTagUsages.Remove(this);
            Entry.Tags.Usages.Remove(this);

            var newUsage = new ArtistTagUsage(Entry, target);

            target.AllArtistTagUsages.Add(newUsage);
            Entry.Tags.Usages.Add(newUsage);

            return(newUsage);
        }
Ejemplo n.º 2
0
 public ArtistTagVote(ArtistTagUsage usage, User user)
     : base(user)
 {
     Usage = usage;
 }
Ejemplo n.º 3
0
 public ArtistTagUsageContract(ArtistTagUsage tagUsage, ContentLanguagePreference languagePreference)
     : base(tagUsage)
 {
     Artist = new ArtistWithAdditionalNamesContract(tagUsage.Artist, languagePreference);
 }
Ejemplo n.º 4
0
 public ArtistTagVote(ArtistTagUsage usage, User user)
     : base(user)
 {
     Usage = usage;
 }