Turn recursive entities into model [Answered]
I have two db entities like this:
I wanna turn this into a model/DTO, so I have these extensions
This however causes a stack overflow because
ToModel(TodoListEntity)
calls ToModel(TodoItemEntity)
and so on which causes unbound recursion. What would the simplest way to fix this be? I somehow have to keep a single list which I can pass to all items inside it.2 Replies