-
Notifications
You must be signed in to change notification settings - Fork 0
/
63.txt
33 lines (30 loc) · 1.3 KB
/
63.txt
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
Dtos Data Transfer Objects
0:04
1) We need to build controller for this entity
2) We will have different endpoints
eg: for getting these employees we have 2 different endpoints,
one for getting a list of employees, -> We only need ids, firstname,
lastname
not the jobs/teams/addresses they
have
=> Different classes for different
purposes
(Employee List)
maybe a filtered list and -> Filter thay we want to send for
this employee list
(Employee Filter)
eg: Filters for first name/address/
job
one for details of the employee for a single employee
-> We can add jobs/teams/addresses
(Employee Details)
=> Different representations of our employee that we want to send to our API/ want API to return to client
(EmployeeCreate) => No need to send identifier as employee doesn't exist so far.
-> job,address, firstname,lastname
but not Id
(EmployeeUpdate) -> send representation with Id
(EmployeeDelete) -> only Id
Entity Employee
---------------------------------------------------------------------------------------------------------------
Dtos
EmployeeCreate EmployeeDelete EmployeeDetails EmployeeList EmployeeFilter