Exemplo n.º 1
0
 public static CourseContentToken ChapterToken2ContentToken(this ChapterEditDTO token)
 {
     return(new CourseContentToken
     {
         Name = token.Name
         , CourseId = token.CourseId
         , ContentId = token.ChapterId
         , Uid = Guid.NewGuid()
         , Kind = CourseEnums.eCourseContentKind.Chapter
         , Chapter = token
     });
 }
Exemplo n.º 2
0
 //chapters
 public static CourseChapters EditDto2CourseChapterEntity(this ChapterEditDTO dto)
 {
     return(new CourseChapters
     {
         CourseId = dto.CourseId
         , ChapterName = dto.Name.TrimString()
         , ChapterOrdinal = dto.OrderIndex ?? 0
         , ChapterDescriptionHTML = string.Empty
         , Created = DateTime.Now
         , LastModified = DateTime.Now
     });
 }
Exemplo n.º 3
0
 public static void UpdateChapterEntity(this CourseChapters entity, ChapterEditDTO dto)
 {
     entity.ChapterName  = dto.Name.TrimString();
     entity.LastModified = DateTime.Now;
 }