Repository, Service or Domain object - where does logic belong?
问题 Take this simple, contrived example: UserRepository.GetAllUsers(); UserRepository.GetUserById(); Inevitably, I will have more complex "queries", such as: //returns users where active=true, deleted=false, and confirmed = true GetActiveUsers(); I'm having trouble determining where the responsibility of the repository ends. GetActiveUsers() represents a simple "query". Does it belong in the repository ? How about something that involves a bit of logic, such as: //activate the user, set the