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 = anime?.Contract?.AniDBAnime;
            contract.AnimeSeries = ser?.GetUserContract(userID);
            return contract;
        }
Beispiel #2
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;
		}