Exemplo n.º 1
0
        public void AddToDatabase(Database.CustomDbContext db)
        {
            if (db == null)
            {
                return;
            }

            if (!InDatabase)
            {
                InDatabase = true;

                foreach (DownloadData download in Downloads.ToList())
                {
                    download.AddToDatabase(db);
                }

                if (Season != null)
                {
                    Season.AddToDatabase(db);
                }

                if (EpisodeInformation != null)
                {
                    EpisodeInformation.AddToDatabase(db);
                }

                Database.DatabaseWriter.AddToDatabase <FavEpisodeData>(db.FavEpisodeData, this);
            }
        }
Exemplo n.º 2
0
        public void AddToDatabase(Database.CustomDbContext db)
        {
            if (db == null)
            {
                return;
            }

            if (!InDatabase)
            {
                InDatabase = true;

                if (Season != null)
                {
                    Season.AddToDatabase(db);
                }

                Database.DatabaseWriter.AddToDatabase <UploadData>(db.UploadData, this);
            }
        }