Esempio n. 1
0
        public static void UpdateChapterVideoEntity(this ChapterVideos entity, ChapterVideoEditDTO dto)
        {
            entity.VideoTitle              = dto.Title.TrimString();
            entity.VideoSummary            = dto.SummaryHTML;
            entity.VideoSupplierIdentifier = dto.VideoIdentifier != null?dto.VideoIdentifier.ToString() : string.Empty;

            entity.IsOpen       = dto.IsOpen ? 1 : 0;
            entity.LastModified = DateTime.Now;
        }
Esempio n. 2
0
 //chapter videos
 public static ChapterVideos EditDto2ChapterVideoEntity(this ChapterVideoEditDTO dto)
 {
     return(new ChapterVideos
     {
         CourseChapterId = dto.ChapterId
         , VideoTitle = dto.Title.TrimString()
         , Ordinal = dto.OrderIndex ?? 0
         , VideoSummary = dto.SummaryHTML
         , VideoSupplierIdentifier = dto.VideoIdentifier != null?dto.VideoIdentifier.ToString() : string.Empty
                                         , IsOpen = dto.IsOpen ? 1 : 0
                                         , Created = DateTime.Now
                                         , LastModified = DateTime.Now
     });
 }