Skip to content

Commit 1f7dfa6

Browse files
committed
Recursive queries
1 parent 7bd1b81 commit 1f7dfa6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/Queryable-Extensions.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,15 @@ You may also use a dictionary to build the projection values:
208208
dbContext.Courses.ProjectTo<CourseModel>(Config, new Dictionary<string, object> { {"currentUserName", Request.User.Name} });
209209
```
210210

211-
However, using a dictionary will result in hard-coded values in the query instead of a parameterized query, so use with caution.
211+
However, using a dictionary will result in hard-coded values in the query instead of a parameterized query, so use with caution.
212+
213+
### Recursive models
214+
215+
Ideally, you would avoid models that reference themselves (do some research). But if you must, you need to enable them:
216+
217+
```c#
218+
configuration.Internal().RecursiveQueriesMaxDepth = someRandomNumber;
219+
```
212220

213221
### Supported mapping options
214222

0 commit comments

Comments
 (0)