mardi 24 mars 2015

Domain model existence checking in ddd

After reading a couple of articles, i started to go more into ddd in my application, but i noticed that i have an issue that i can't solve,


lets say that i have an entity called cart and it has many items, item entity should exist to be added to cart, so i have to check each id sent in the request to verify that it exist.


My question is where does this checking happen, is it in the application layer or maybe the domain service, or is it a specification that a itemMustExist ?


Aucun commentaire:

Enregistrer un commentaire