I try to implement DDD service with using of CQRS approach. I'm not using event sourcing. So I have 3 layers: Application, Infrastructure, and Domain. Many peoples said that you can bypass domain for queries, and it is okay. For example, imagine it is necessary for me because of performance issues.
Following persistence ignorance, I have repository implementation in Infrastructure. As I see in all implementations of DDD and books, Infrastructure should not be dependent on the Application layer.
So what I need to return from the repository?? If DTO(Read models, View models, it actually doesn't matter) is an Application concern. Placing them on the Infrastructure layer makes a circular dependency from Application to Infrastructure and vice versa. But implementing query logic (if I using Orm which queries by writing raw SQL) is a bad approach because for that purpose we have created the repository in Infrastructure (That was the way of https://github.com/dotnet-architecture/eShopOnContainers).
Another approach is load aggregates from the repository and then convert them to DTO, but it is impossible due to my fictional issues. So how to deal with that in the right way? (That was the way of https://github.com/JasonGT/NorthwindTraders/)