public void CreateAnimeEpisode(ISession session, int animeSeriesID) { // check if there is an existing episode for this EpisodeID AnimeEpisode existingEp = RepoFactory.AnimeEpisode.GetByAniDBEpisodeID(EpisodeID); if (existingEp == null) { AnimeEpisode animeEp = new AnimeEpisode(); animeEp.Populate(this); animeEp.AnimeSeriesID = animeSeriesID; RepoFactory.AnimeEpisode.Save(animeEp); } }
public void CreateAnimeEpisode(ISession session, int animeSeriesID) { // check if there is an existing episode for this EpisodeID AnimeEpisodeRepository repEps = new AnimeEpisodeRepository(); AnimeEpisode existingEp = repEps.GetByAniDBEpisodeID(session, EpisodeID); if (existingEp == null) { AnimeEpisode animeEp = new AnimeEpisode(); animeEp.Populate(this); animeEp.AnimeSeriesID = animeSeriesID; repEps.Save(session, animeEp); } }
public void CreateAnimeEpisode(ISession session, int animeSeriesID) { // check if there is an existing episode for this EpisodeID AnimeEpisodeRepository repEps = new AnimeEpisodeRepository(); List<AnimeEpisode> existingEps = repEps.GetByAniEpisodeIDAndSeriesID(session, EpisodeID, animeSeriesID); if (existingEps.Count == 0) { AnimeEpisode animeEp = new AnimeEpisode(); animeEp.Populate(this); animeEp.AnimeSeriesID = animeSeriesID; repEps.Save(session, animeEp); } }