You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Entities.SQLuedoDB;
|
|
using Model.Business;
|
|
|
|
namespace Model.Mappers
|
|
{
|
|
public static class ContentLessonMapper
|
|
{
|
|
public static ContentLesson FromDTOToModel(this ContentLessonDTO dto)
|
|
{
|
|
return new ContentLesson(dto.LessonId, dto.LessonPartId);
|
|
}
|
|
|
|
public static ContentLesson FromEntityToModel(this ContentLessonEntity ent)
|
|
{
|
|
return new ContentLesson(ent.LessonId, ent.LessonPartId);
|
|
}
|
|
|
|
public static ContentLessonDTO FromModelToDTO(this ContentLesson les)
|
|
{
|
|
return new ContentLessonDTO(les.LessonId, les.LessonPartId);
|
|
}
|
|
|
|
public static ContentLessonDTO FromEntityToDTO(this ContentLessonEntity ent)
|
|
{
|
|
return new ContentLessonDTO(ent.LessonId, ent.LessonPartId);
|
|
}
|
|
|
|
public static ContentLessonEntity FromModelToEntity(this ContentLesson les)
|
|
{
|
|
return new ContentLessonEntity(les.LessonId,new LessonEntity(les.LessonId),les.LessonPartId,new ParagraphEntity(les.LessonPartId));
|
|
}
|
|
}
|
|
}
|