Should write complex query in Repository or Service layer?
问题 I are planning migrate our data access layer to using repository pattern and unit of work. I do know repository will help me to change persistence store (database, collection...etc) and technology such as EF to MongoDB easily. So I noticed some key points of implementation of a repository such as: Return IEnumerable instead of IQueryable Repository should take responsibilities for CRUD operations only Return type of repository method should be model (entity) Only implement repository for