|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
using Dto;
|
|
|
|
|
using Entities;
|
|
|
|
|
using ModelToEntities.Business;
|
|
|
|
|
using Model;
|
|
|
|
|
|
|
|
|
|
namespace Shared.Mapper;
|
|
|
|
|
|
|
|
|
@ -8,31 +8,35 @@ public static class ParagraphMapper
|
|
|
|
|
{
|
|
|
|
|
public static Paragraph FromDTOToModel(ParagraphDTO dto)
|
|
|
|
|
{
|
|
|
|
|
return new Paragraph(dto.Id, dto.Title, dto.Content, dto.Info, dto.Query, dto.Comment);
|
|
|
|
|
return new Paragraph(dto.ContentTitle, dto.ContentContent, dto.Info, dto.Query, dto.Comment);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Paragraph FromEntityToModel(ParagraphEntity model)
|
|
|
|
|
{
|
|
|
|
|
return new Paragraph(model.Id, model.Title, model.Content, model.Info, model.Query, model.Comment);
|
|
|
|
|
return new Paragraph(model.ContentTitle, model.ContentContent, model.Info, model.Query, model.Comment);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ParagraphDTO FromEntityToDTO(ParagraphEntity model)
|
|
|
|
|
{
|
|
|
|
|
return new ParagraphDTO(model.Id, model.Title, model.Content, model.Info, model.Query, model.Comment);
|
|
|
|
|
return new ParagraphDTO(model.Id, model.ContentTitle, model.ContentContent, model.Info, model.Query,
|
|
|
|
|
model.Comment, model.LessonId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ParagraphDTO FromModelToDTO(Paragraph model)
|
|
|
|
|
{
|
|
|
|
|
return new ParagraphDTO(model.Id, model.Title, model.Content, model.Info, model.Query, model.Comment);
|
|
|
|
|
return new ParagraphDTO(model.Id, model.ContentTitle, model.ContentContent, model.Info, model.Query,
|
|
|
|
|
model.Comment, model.LessonId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ParagraphEntity FromDTOToEntity(ParagraphDTO dto)
|
|
|
|
|
{
|
|
|
|
|
return new ParagraphEntity(dto.Id, dto.Title, dto.Content, dto.Info, dto.Query, dto.Comment);
|
|
|
|
|
return new ParagraphEntity(dto.Id, dto.ContentTitle, dto.ContentContent, dto.Info, dto.Query, dto.Comment,
|
|
|
|
|
dto.LessonId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Paragraph FromModelToEntity(Paragraph model)
|
|
|
|
|
public static ParagraphEntity FromModelToEntity(Paragraph model)
|
|
|
|
|
{
|
|
|
|
|
return new Paragraph(model.Id, model.Title, model.Content, model.Info, model.Query, model.Comment);
|
|
|
|
|
return new ParagraphEntity(model.Id, model.ContentTitle, model.ContentContent, model.Info, model.Query,
|
|
|
|
|
model.Comment, model.LessonId);
|
|
|
|
|
}
|
|
|
|
|
}
|