bookuha
❔ CRUD(REST) + DDD
There are some ways I see to handle this:
1) Change entity using JsonPatch, then run a domain validator on it (looks very bad)
2) Define EntityDomainService.Update() & Entity.Update() methods that will validate any changes that happen
3) In Application Service figure our what properties have changed, then call related Entity.UpdatePropertyName1(), UpdatePropertyName2() methods
3) looks the most correct yet the most difficult way and I have never seen anything like that before
1) looks simple and working, but not so expressive
5 replies