Esempio n. 1
0
        public void AddPriorityShow(int TelevisionShowId, int PriorityLevel = 3)
        {
            var TelevisionShowIdParam = TelevisionShowId == default ? new SqlParameter("@TelevisionShowId", default(int)) : new SqlParameter("@TelevisionShowId", TelevisionShowId);
            var PriorityLevelIdParam  = PriorityLevel == default ? new SqlParameter("@PriorityLevelId", default(int)) : new SqlParameter("@PriorityLevelId", PriorityLevel);

            TelevisionShowLibrary.FromSqlRaw("[dbo].[AddPriorityShow] @TelevisionShowId, @PriorityLevelId", TelevisionShowIdParam, PriorityLevelIdParam);
            SaveChanges();
        }
Esempio n. 2
0
        public void AddPriorityLevel(string PriorityLevelName, int PriorityLevelCode = 3)
        {
            var PriorityLevelNameParam = string.IsNullOrEmpty(PriorityLevelName) ? new SqlParameter("@PriorityLevelName", default(int)) : new SqlParameter("@TelevisionShowId", PriorityLevelName);
            var PriorityLevelCodeParam = PriorityLevelCode == default ? new SqlParameter("@PriorityLevelCode", default(int)) : new SqlParameter("@PriorityLevelCode", PriorityLevelCode);

            TelevisionShowLibrary.FromSqlRaw("[dbo].[AddPriorityLevel] @PriorityLevelName, @PriorityLevelCode", PriorityLevelNameParam, PriorityLevelCodeParam);
            SaveChanges();
        }
Esempio n. 3
0
        public void AddMissingEpisodeRecord(int _ShowId, int _SeasonId, int _EpisodeId, string _EpisodeFilePath = null, string _ImdbId = null, string _TvMazeId = null, string _TheMovieDbId = null)
        {
            var showIdParam       = new SqlParameter("@ShowId", _ShowId);
            var SeasonIdParam     = new SqlParameter("@SeasonId", _SeasonId);
            var EpisodeIdParam    = new SqlParameter("@EpisodeId", _EpisodeId);
            var FilePathParam     = string.IsNullOrEmpty(_EpisodeFilePath) ? new SqlParameter("@EpisodeFilePath", default(string)) : new SqlParameter("@EpisodeFilePath", _EpisodeFilePath);
            var ImdbIdParam       = string.IsNullOrEmpty(_ImdbId) ? new SqlParameter("@ImdbId", default(string)) : new SqlParameter("@ImdbId", _ImdbId);
            var TvMazeIdParam     = string.IsNullOrEmpty(_TvMazeId) ? new SqlParameter("@TvMazeId", default(string)) : new SqlParameter("@TvMazeId", _TvMazeId);
            var TheMovieDbIdParam = string.IsNullOrEmpty(_TheMovieDbId) ? new SqlParameter("@TheMovieDbId", default(string)) : new SqlParameter("@TheMovieDbId", _TheMovieDbId);

            TelevisionShowLibrary.FromSqlRaw("[dbo].[AddMissingEpisode] @ShowId, @SeasonId, @EpisodeId, @EpisodeFilePath, @ImdbId, @TvMazeId, @TheMovieDbId", showIdParam, SeasonIdParam, EpisodeIdParam, FilePathParam, ImdbIdParam, TvMazeIdParam, TheMovieDbIdParam);
            SaveChanges();
        }