-
Notifications
You must be signed in to change notification settings - Fork 0
/
Extensions.cs
36 lines (33 loc) · 902 Bytes
/
Extensions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using HR_Tech.DTOs;
using HR_Tech.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace HR_Tech
{
public static class Extensions
{
public static TechnologyDTO AsDTO(this Technology technology)
{
return new TechnologyDTO(
technology.Id,
technology.Name);
}
public static JobOpeningDTO AsDTO(this JobOpening jobOpening)
{
return new JobOpeningDTO(
jobOpening.Id,
jobOpening.Name);
}
public static CandidateDTO AsDTO(this Candidate candidate)
{
return new CandidateDTO(
candidate.Id,
candidate.CPF,
candidate.Name,
candidate.JobOpening,
candidate.Technology);
}
}
}