展示层可以调用验证逻辑对表单提供的数据进行验证,然后再将该数据传递给域模型。
The presentation layer can call the validation logic on the data provided by a form before passing it to the domain model.
唯一障碍是创建其他 DTO 层和进行它们与域模型之间相互转换。
The only hurdle is creating an additional layer of DTOs and converting them to/from domain objects.
因为包含事务逻辑的惟一的一个层是api层,我将只展示该层的域模型类中的事务逻辑。
Because the only layer containing transaction logic is the API layer, I will only show the transaction logic in that layer's domain-model classes.
应用推荐