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