using Dto; using Entities; using Model; namespace Shared.Mapper; public static class SolutionMapper { public static Solution FromDTOToModel(this SolutionDto dto) { return new Solution(dto.OwnerId, dto.MurdererFirstName, dto.MurdererLastName, dto.MurderPlace, dto.MurderWeapon, dto.Explanation); } public static Solution FromEntityToModel(this SolutionEntity entity) { return new Solution(entity.OwnerId, entity.MurdererFirstName, entity.MurdererLastName, entity.MurderPlace, entity.MurderWeapon, entity.Explaination); } public static SolutionDto FromModelToDTO(this Solution model) { return new SolutionDto(model.OwnerId, model.MurdererFirstName, model.MurdererLastName, model.MurderPlace, model.MurderWeapon, model.Explanation); } public static SolutionDto FromEntityToDTO(this SolutionEntity entity) { return new SolutionDto(entity.OwnerId, entity.MurdererFirstName, entity.MurdererLastName, entity.MurderPlace, entity.MurderWeapon, entity.Explaination); } public static SolutionEntity FromModelToEntity(this Solution model) { return new SolutionEntity(model.OwnerId, new InquiryEntity(model.OwnerId), model.MurdererFirstName, model.MurdererLastName, model.MurderPlace, model.MurderWeapon, model.Explanation); } public static SolutionEntity FromDTOToEntity(this SolutionDto dto) { return new SolutionEntity(dto.OwnerId, new InquiryEntity(dto.OwnerId), dto.MurdererFirstName, dto.MurdererLastName, dto.MurderPlace, dto.MurderWeapon, dto.Explanation); } }