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.
37 lines
1.0 KiB
37 lines
1.0 KiB
using Infrastructure.Entities;
|
|
using Server.Dto.Request;
|
|
using Server.Dto.Response;
|
|
|
|
namespace Server.Mappers
|
|
{
|
|
public static class ExperiencesMappers
|
|
{
|
|
public static ResponseExperienceDto ToDto(this ExperienceEntity exp)
|
|
{
|
|
return new ResponseExperienceDto
|
|
{
|
|
Id = exp.Id,
|
|
AlumniId = exp.AlumniId,
|
|
Title= exp.Title,
|
|
StartingDate = exp.StartDate,
|
|
EndingDate = exp.EndDate,
|
|
CompanyName = exp.CompanyName,
|
|
CurrentJob = exp.IsCurrent,
|
|
};
|
|
}
|
|
|
|
public static ExperienceEntity ToEntity(this RequestExperienceDto exp)
|
|
{
|
|
return new ExperienceEntity
|
|
{
|
|
AlumniId = exp.AlumniId,
|
|
Title = exp.Title,
|
|
StartDate = exp.StartingDate,
|
|
EndDate = exp.EndingDate,
|
|
CompanyName = exp.CompanyName,
|
|
IsCurrent = exp.CurrentJob,
|
|
};
|
|
}
|
|
}
|
|
}
|