Two times Projection triggers LINQ expression translation exception #832
Replies: 1 comment
-
Sorry, incorrect repository |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Everyone,
I'm working on application where I have to perform the projection 2 times
1- Between EfModel and DomainModel
2-Between DomainModel and DTO
I'd like to keep the process as IQueryable all the way from the request to response, so I perfomed the following steps
1-
In Interface layer where my graphql query lands:
Application layer
Then the in the repository
If I replace the
<IQueryable<BoxDto>>
with<IQueryable<Box>>
everything works well even with complex and nested queries, the problem is with the second projectionit worth to share that
-The BoxDTO and Box are identical, the types are of course different but the properties has the same names
-The query takes in normal case 700 ms if I return a DomainModel, while it takes 35 Seconds until the exceptions shows up
-I've tried the MaxDepth(1) as I had a doubt of circular references but with no difference
I appreciate your help!
Beste regards,
Ahmed
Beta Was this translation helpful? Give feedback.
All reactions