I am reading the code of Cargo DDD sample. Can someone explain to me why the Location is Entity? I think it should be a Value Object. What do you think?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Location is an Entity cause it has an Identity to identify and its an integral part of the Domain. Cause cargo gets shipped from one source location over other locations to a specific destination location.
You need to identity the diffrent locations correctly by its identity and therefore you need a repository to get locations from data source or to insert new locations.