Exemple #1
0
        public Contract_AniDB_Anime_Relation ToContract(AniDB_Anime anime, AnimeSeries ser, int userID)
        {
            Contract_AniDB_Anime_Relation contract = new Contract_AniDB_Anime_Relation();

            contract.AniDB_Anime_RelationID = this.AniDB_Anime_RelationID;
            contract.AnimeID        = this.AnimeID;
            contract.RelationType   = this.RelationType;
            contract.RelatedAnimeID = this.RelatedAnimeID;

            contract.AniDB_Anime = null;
            if (anime != null)
            {
                contract.AniDB_Anime = anime.ToContract();
            }

            contract.AnimeSeries = null;
            if (ser != null)
            {
                contract.AnimeSeries = ser.ToContract(ser.GetUserRecord(userID));
            }

            return(contract);
        }
        public Contract_AniDB_Anime_Similar ToContract(AniDB_Anime anime, AnimeSeries ser, int userID)
        {
            Contract_AniDB_Anime_Similar contract = new Contract_AniDB_Anime_Similar();

            contract.AniDB_Anime_SimilarID = this.AniDB_Anime_SimilarID;
            contract.AnimeID        = this.AnimeID;
            contract.SimilarAnimeID = this.SimilarAnimeID;
            contract.Approval       = this.Approval;
            contract.Total          = this.Total;

            contract.AniDB_Anime = null;
            if (anime != null)
            {
                contract.AniDB_Anime = anime.ToContract();
            }

            contract.AnimeSeries = null;
            if (ser != null)
            {
                contract.AnimeSeries = ser.ToContract(ser.GetUserRecord(userID));
            }

            return(contract);
        }