Example #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.AllAlbumTagUsages.Remove(this);
            Entry.Tags.Usages.Remove(this);

            var newUsage = new AlbumTagUsage(Entry, target);

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

            return(newUsage);
        }
Example #2
0
 public AlbumTagVote(AlbumTagUsage usage, User user)
     : base(user)
 {
     Usage = usage;
 }
Example #3
0
 public AlbumTagVote(AlbumTagUsage usage, User user)
     : base(user)
 {
     Usage = usage;
 }
 public AlbumTagUsageContract(AlbumTagUsage tagUsage, ContentLanguagePreference languagePreference)
     : base(tagUsage)
 {
     Album = new AlbumWithAdditionalNamesContract(tagUsage.Album, languagePreference);
 }