If i am converting a entity to a DTO where this conversion methord should exist?
- in a utility class
- in same entity
- in DTO
I usually put these in utility class, but thinking why should not i move this to entity or DTO.
Like object (here: DTO or entity) should know what and how operation can be done on it (here: conversion)
Aucun commentaire:
Enregistrer un commentaire