3
votes
2answers
648 views

Validation and data persistence in a domain model

My (first and current) workplace (a .NET shop) suffers from an over-abundance of anemic domain models, to the extent that I don't really know how validation and data persistence should be handled in a ...
1
vote
1answer
456 views

Where to validate domain model rules that depend on database content?

I'm working on a system that allows Administrators to define Forms that contain Fields. The defined Forms are then used to enter data to the system. Sometimes the Forms are filled by a human via a ...
7
votes
3answers
1k views

IValidatableObject vs Single Responsibility

I like the extnesibility point of MVC, allowing view models to implement IValidatableObject, and add custom validation. I try to keep my Controllers lean, having this code be the only validation ...
6
votes
2answers
2k views

Command handlers and DDD

I have an ASP.NET MVC application, that uses a query service to get data and a command service to send commands. My question is about the command part. If a request comes in, the command service uses ...