User1058130854 posted
I have a question, if we push complex/multi table queries into the repository layer which I agree is where it should belong - how would you go about unit testing this logic without having a database?
I might add, that normally I would have that when unit testing, you would implement a dummy IRepository, or mock the IRepository so that it would return your domain objects, and you would then unit test the controller classes with a mocked repository.
However by pushing complex queries into the repository itself, it makes it difficult to mock - I mean you wouldn't want to reimplement your complex query logic in the mock, which really only leaves testing with a real database connected, which makes it an
integration test
Dave