Where would you place validation code for a domain entity? Inside the class itself in a method like Validate() or outside in the context where the object is being used? Or both?
Where would you place validation code for a domain entity? Inside the class itself
Share
If the validation only has to consult objects inside the entity then put the validation inside the entity. For a Person entity