DTO to Entity And Entity to DTO
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We're to use DTO's to send data to and from the presentation layer. We have layers like: facade appService domain And We have use Dozer to help us convert entity to dto. But i have 2 question now: from entity to dto we can use dozer, but from dto to entity can we use dozer? If Yes, How? Where shoud i create entity? in facade or DTOAssembler? for example,I have to register a book. the book Entity look's like: Book{ public Book(BookNumber number,String name){ //make sure every book has a business number, //and the number can't change once the