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.
45 lines
1.4 KiB
45 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 NotepadMapper
|
|
{
|
|
public static Notepad FromDTOToModel(this NotepadDTO dto)
|
|
{
|
|
return new Notepad(dto.Id, dto.UserId, dto.InquiryId, dto.Notes);
|
|
}
|
|
|
|
public static Notepad FromEntityToModel(this NotepadEntity ent)
|
|
{
|
|
return new Notepad(ent.Id, ent.UserId, ent.InquiryId, ent.Notes);
|
|
}
|
|
|
|
public static NotepadDTO FromModelToDTO(this Notepad not)
|
|
{
|
|
return new NotepadDTO(not.Id, not.UserId, not.InquiryId, not.Notes);
|
|
}
|
|
|
|
public static NotepadDTO FromEntityToDTO(this NotepadEntity ent)
|
|
{
|
|
return new NotepadDTO(ent.Id, ent.UserId, ent.InquiryId, ent.Notes);
|
|
}
|
|
|
|
public static NotepadEntity FromDTOToEntity(this NotepadDTO dto)
|
|
{
|
|
return new NotepadEntity(dto.Id,new UserEntity(dto.UserId), dto.UserId, new InquiryEntity(dto.InquiryId), dto.Notes);
|
|
}
|
|
|
|
public static NotepadEntity FromModelToEntity(this Notepad not)
|
|
{
|
|
return new NotepadEntity(not.Id, new UserEntity(not.UserId), not.UserId, new InquiryEntity(not.InquiryId), not.Notes);
|
|
}
|
|
}
|
|
}
|