Where to put domain logic which needs to fetch data from database

I know that domain logic should be placed into domain objects. But what if my domain logic needs data from the database ? (e.g. checking unique value, computed values.. etc ) I think injecting repositories into my domain objects isn't the right thing. Also the service layer should not contain business rules. So how to solve this kind of business logic ?

7
задан user256034 15 May 2011 в 17:44
поделиться