Exemple #1
0
        /// <summary>
        /// 插入字幕,插入前先判断这个地址是否已经存在
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int SaveSubtitle(Subtitle_Repository model)
        {
            int?movieID = GetSubtitleIDByUrl(model.Download);

            if (!movieID.HasValue)
            {
                return(Insert(model));
            }
            else
            {
                return(movieID.Value);
            }
        }
Exemple #2
0
 /// <summary>
 /// 插入字幕
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int Insert(Subtitle_Repository model)
 {
     return(db.Add <int>(model));
 }