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.
39 lines
1.1 KiB
39 lines
1.1 KiB
using Dto;
|
|
using Entities;
|
|
using Model;
|
|
|
|
namespace Shared.Mapper;
|
|
|
|
public static class InquiryMapper
|
|
{
|
|
public static Inquiry FromDTOToModel(this InquiryDto inqDto)
|
|
{
|
|
return new Inquiry(inqDto.Id, inqDto.Title, inqDto.Description, inqDto.IsUser);
|
|
}
|
|
|
|
public static Inquiry FromEntityToModel(this InquiryEntity inqEntity)
|
|
{
|
|
return new Inquiry(inqEntity.Id, inqEntity.Title, inqEntity.Description, inqEntity.IsUser);
|
|
}
|
|
|
|
|
|
public static InquiryEntity FromModelToEntity(this Inquiry inq)
|
|
{
|
|
return new InquiryEntity(inq.Id, inq.Title, inq.Description, inq.IsUser);
|
|
}
|
|
|
|
public static InquiryEntity FromDTOToEntity(this InquiryDto inqDto)
|
|
{
|
|
return new InquiryEntity(inqDto.Id, inqDto.Title, inqDto.Description, inqDto.IsUser);
|
|
}
|
|
|
|
public static InquiryDto FromModelToDTO(this Inquiry inq)
|
|
{
|
|
return new InquiryDto(inq.Id, inq.Title, inq.Description, inq.IsUser);
|
|
}
|
|
|
|
public static InquiryDto FromEntityToDTO(this InquiryEntity inqEntity)
|
|
{
|
|
return new InquiryDto(inqEntity.Id, inqEntity.Title, inqEntity.Description, inqEntity.IsUser);
|
|
}
|
|
} |