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.
43 lines
1.4 KiB
43 lines
1.4 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Entities.SQLuedoDB;
|
|
using Model.Business;
|
|
using Model.DTO;
|
|
namespace Model.Mappers
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|