Exemplo n.º 1
0
 //chapters
 public static BaseListDTO ChapterEntity2ListDTO(this CourseChapters entity)
 {
     return(new BaseListDTO
     {
         id = entity.Id
         , name = entity.ChapterName
         , index = entity.ChapterOrdinal
     });
 }
Exemplo n.º 2
0
 public static ChapterEditDTO ChapterEntity2ChapterEditDTO(this CourseChapters entity)
 {
     return(new ChapterEditDTO
     {
         ChapterId = entity.Id
         , CourseId = entity.CourseId
         , Name = entity.ChapterName
         , OrderIndex = entity.ChapterOrdinal
     });
 }
Exemplo n.º 3
0
 public static void UpdateChapterEntityOrderIndex(this CourseChapters entity, int index)
 {
     entity.ChapterOrdinal = index;
     entity.LastModified   = DateTime.Now;
 }
Exemplo n.º 4
0
 public static void UpdateChapterEntity(this CourseChapters entity, WizardChapterListEditDTO dto)
 {
     entity.ChapterName  = dto.Name.TrimString();
     entity.LastModified = DateTime.Now;
 }