Пример #1
0
        private static void AddCrossRef_AniDB_TvDBV2(int animeID, int tvdbID, CrossRefSource source)
        {
            if (Repo.Instance.CrossRef_AniDB_Provider.GetByAnimeIdAndProvider(CrossRefType.TvDB, animeID, tvdbID.ToString()) == null)
            {
                return;
            }

            SVR_CrossRef_AniDB_Provider xref = new SVR_CrossRef_AniDB_Provider
            {
                AnimeID        = animeID,
                CrossRefID     = tvdbID.ToString(),
                CrossRefSource = source,
                CrossRefType   = CrossRefType.TvDB
            };

            Repo.Instance.CrossRef_AniDB_Provider.BeginAdd(xref).Commit();
        }
Пример #2
0
        private static void AddCrossRef_AniDB_TvDBV2(int animeID, int tvdbID, CrossRefSource source)
        {
            CrossRef_AniDB_TvDB xref =
                RepoFactory.CrossRef_AniDB_TvDB.GetByAniDBAndTvDBID(animeID, tvdbID);

            if (xref != null)
            {
                return;
            }
            xref = new CrossRef_AniDB_TvDB
            {
                AniDBID        = animeID,
                TvDBID         = tvdbID,
                CrossRefSource = source
            };
            RepoFactory.CrossRef_AniDB_TvDB.Save(xref);
        }
        private static void AddCrossRef_AniDB_TvDBV2(int animeID, int tvdbID, CrossRefSource source)
        {
            CrossRef_AniDB_TvDB xref =
                Repo.Instance.CrossRef_AniDB_TvDB.GetByAniDBAndTvDBID(animeID, tvdbID);

            if (xref != null)
            {
                return;
            }
            xref = new CrossRef_AniDB_TvDB
            {
                AniDBID        = animeID,
                TvDBID         = tvdbID,
                CrossRefSource = source
            };
            Repo.Instance.CrossRef_AniDB_TvDB.BeginAdd(xref).Commit();
        }