Exemplo n.º 1
0
    public MatchyBackend.Cv mapToService(Cv cv)
    {
        var eduMapper = new EducationMapper();
        var sourceMapper = new SourceMapper();

        MatchyBackend.Cv result = new MatchyBackend.Cv();

        if (cv != null)
        {
            return new MatchyBackend.Cv()
            {
                Name = cv.Name,
                CvID = cv.CvID,
                Age = cv.Age,
                Sex = cv.Sex,
                Interests = cv.Interests,
                Personal = cv.Personal,
                City = cv.City,
                Date = cv.Date,
                Discipline = cv.Discipline,
                EducationHistory = cv.EducationHistory,
                EducationLevel = eduMapper.MapToService(cv.EducationLevel),
                Hours = cv.Hours,
                Profession = cv.Profession,
                Province = cv.Province,
                Email = cv.Email,
                JobRequirements = cv.JobRequirements,
                WorkExperience = cv.WorkExperience,
                Source = sourceMapper.MapToService(cv.Source)
            };
        }
        else
            return result;
    }
Exemplo n.º 2
0
    public MatchyBackend.Job mapToService(Job job)
    {
        CompanyMapping companyMapping = new CompanyMapping();
        EducationMapper educationMapping = new EducationMapper();
        DetailJobMapper detailMapping = new DetailJobMapper();

        MatchyBackend.Job backEndUser = new MatchyBackend.Job()
        {
            JobID = job.JobID,
            Company = companyMapping.MapToService(job.Company),
            Education = educationMapping.MapToService(job.Education),
            DetailJob = detailMapping.MapToService(job.DetailJob),
            JobTitle = job.JobTitle,
            JobDescription = job.JobDescription,
            JobPlaceDate = job.JobPlaceDate,
            JobHours = job.JobHours
        };

        return backEndUser;
    }