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.
38 lines
1.1 KiB
38 lines
1.1 KiB
using Dto;
|
|
using Entities;
|
|
using Model;
|
|
|
|
namespace Shared.Mapper;
|
|
|
|
public static class LessonMapper
|
|
{
|
|
public static LessonDTO FromModelToDTO(this Lesson model)
|
|
{
|
|
return new LessonDTO(model.Id, model.Title, model.LastPublisher, model.LastEdit);
|
|
}
|
|
|
|
public static LessonDTO FromEntityToDTO(this LessonEntity model)
|
|
{
|
|
return new LessonDTO(model.Id, model.Title, model.LastPublisher, model.LastEdit);
|
|
}
|
|
|
|
public static LessonEntity FromModelToEntity(this Lesson model)
|
|
{
|
|
return new LessonEntity(model.Id, model.Title, model.LastPublisher, model.LastEdit);
|
|
}
|
|
|
|
public static LessonEntity FromDTOToEntity(this LessonDTO dto)
|
|
{
|
|
return new LessonEntity(dto.Id, dto.Title, dto.LastPublisher, dto.LastEdit);
|
|
}
|
|
|
|
public static Lesson FromDTOToModel(this LessonDTO dto)
|
|
{
|
|
return new Lesson(dto.Id, dto.Title, dto.LastPublisher, dto.LastEdit);
|
|
}
|
|
|
|
public static Lesson FromEntityToModel(this LessonEntity entity)
|
|
{
|
|
return new Lesson(entity.Id, entity.Title, entity.LastPublisher, entity.LastEdit);
|
|
}
|
|
} |