|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
using Entities.SQLudeoDB;
|
|
|
|
using Model.Business;
|
|
|
|
using Model.Business;
|
|
|
|
using Model.DTO;
|
|
|
|
using Model.DTO;
|
|
|
|
|
|
|
|
|
|
|
@ -14,5 +15,29 @@ namespace Model.Mappers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return new Solution(dto.OwnerId,dto.Owner.FromDTOToModel(),dto.MurdererFirstName,dto.MurdererLastName,dto.MurderPlace,dto.MurderWeapon,dto.Explanation);
|
|
|
|
return new Solution(dto.OwnerId,dto.Owner.FromDTOToModel(),dto.MurdererFirstName,dto.MurdererLastName,dto.MurderPlace,dto.MurderWeapon,dto.Explanation);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Solution FromEntityToModel(this SolutionEntity entity)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new Solution(entity.OwnerId, entity.Owner.FromEntityToModel(), entity.MurdererFirstName, entity.MurdererLastName, entity.MurderPlace, entity.MurderWeapon, entity.Explanation);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public static SolutionDTO FromModelToDTO(this Solution model)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new SolutionDTO(model.OwnerId, model.Owner.FromModelToDTO(), model.MurdererFirstName, model.MurdererLastName, model.MurderPlace, model.MurderWeapon, model.Explanation);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static SolutionDTO FromEntityToDTO(this SolutionEntity entity)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new SolutionDTO(entity.OwnerId, entity.Owner.FromEntityToDTO(), entity.MurdererFirstName, entity.MurdererLastName, entity.MurderPlace, entity.MurderWeapon, entity.Explanation);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static SolutionEntity FromModelToEntity(this Solution model)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new SolutionEntity(model.OwnerId, model.Owner.FromModelToEntity(), model.MurdererFirstName, model.MurdererLastName, model.MurderPlace, model.MurderWeapon, model.Explanation);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static SolutionEntity FromDTOToEntity(this SolutionDTO dto)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new SolutionEntity(dto.OwnerId, dto.Owner.FromDTOToEntity(), dto.MurdererFirstName, dto.MurdererLastName, dto.MurderPlace, dto.MurderWeapon, dto.Explanation);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|