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); }
public AlbumTagVote(AlbumTagUsage usage, User user) : base(user) { Usage = usage; }
public AlbumTagUsageContract(AlbumTagUsage tagUsage, ContentLanguagePreference languagePreference) : base(tagUsage) { Album = new AlbumWithAdditionalNamesContract(tagUsage.Album, languagePreference); }