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.2 KiB
38 lines
1.2 KiB
using Dto;
|
|
using Entities;
|
|
using ModelToEntities.Business;
|
|
|
|
namespace Shared.Mapper;
|
|
|
|
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);
|
|
}
|
|
|
|
public static Paragraph FromEntityToModel(ParagraphEntity model)
|
|
{
|
|
return new Paragraph(model.Id, model.Title, model.Content, 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);
|
|
}
|
|
|
|
public static ParagraphDTO FromModelToDTO(Paragraph model)
|
|
{
|
|
return new ParagraphDTO(model.Id, model.Title, model.Content, model.Info, model.Query, model.Comment);
|
|
}
|
|
|
|
public static ParagraphEntity FromDTOToEntity(ParagraphDTO dto)
|
|
{
|
|
return new ParagraphEntity(dto.Id, dto.Title, dto.Content, dto.Info, dto.Query, dto.Comment);
|
|
}
|
|
|
|
public static Paragraph FromModelToEntity(Paragraph model)
|
|
{
|
|
return new Paragraph(model.Id, model.Title, model.Content, model.Info, model.Query, model.Comment);
|
|
}
|
|
} |