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.
API_SQLuedo/API_SQLuedo/ModelToEntities/InquiryTableMapper.cs

40 lines
1.3 KiB

using Dto;
using Entities;
using ModelToEntities.Business;
namespace ModelToEntities
{
public static class InquiryTableMapper
{
public static InquiryTable FromDTOToModel(this InquiryTableDTO InqTDto)
{
return new InquiryTable(InqTDto.OwnerId, InqTDto.ConnectionInfo, InqTDto.DatabaseName);
}
public static InquiryTable FromEntityToModel(this InquiryTableEntity InqTEntity)
{
return new InquiryTable(InqTEntity.OwnerId, InqTEntity.ConnectionInfo, InqTEntity.DatabaseName);
}
public static InquiryTableDTO FromModelToDTO(this InquiryTable InqT)
{
return new InquiryTableDTO(InqT.OwnerId, InqT.DatabaseName, InqT.ConnectionInfo);
}
public static InquiryTableDTO FromEntityToDTO(this InquiryTableEntity InqTEntity)
{
return new InquiryTableDTO(InqTEntity.OwnerId, InqTEntity.DatabaseName, InqTEntity.ConnectionInfo);
}
public static InquiryTableEntity FromModelToEntity(this InquiryTable InqT)
{
return new InquiryTableEntity(InqT.OwnerId, InqT.DatabaseName, InqT.ConnectionInfo);
}
public static InquiryTableEntity FromDTOToEntity(this InquiryTableDTO dto)
{
return new InquiryTableEntity(dto.OwnerId, dto.DatabaseName, dto.ConnectionInfo);
}
}
}