|
|
@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using Entities.SQLudeoDB;
|
|
|
|
|
|
|
|
using Model.Business;
|
|
|
|
|
|
|
|
using Model.DTO;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Model.Mappers
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public class LessonMapper
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static LessonDTO FromModelToDTO(Lesson model)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new LessonDTO(model.Id, model.Title, model.LastPublisher, model.LastEdit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static LessonDTO FromEntityToDTO(LessonEntity model)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new LessonDTO(model.Id, model.Title, model.LastPublisher, model.LastEdit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static LessonEntity FromModelToEntity(Lesson model)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new LessonEntity(model.Id, model.Title, model.LastPublisher, model.LastEdit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static LessonEntity FromDTOToEntity(LessonDTO dto)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new LessonEntity(dto.Id, dto.Title, dto.LastPublisher, dto.LastEdit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Lesson FromDTOToModel(LessonDTO dto)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new Lesson(dto.Id, dto.Title, dto.LastPublisher, dto.LastEdit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Lesson FromEntityToModel(LessonEntity entity)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new Lesson(entity.Id, entity.Title, entity.LastPublisher, entity.LastEdit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|