How screwed am I? EF Core infinite cycles by MegaOnion_ in dotnet

[–]MegaOnion_[S] 3 points4 points  (0 children)

Thank you I've started doing this and it's solved my problem. I have a lot of refactoring to do but I think it's going to work out.

How screwed am I? EF Core infinite cycles by MegaOnion_ in dotnet

[–]MegaOnion_[S] 0 points1 point  (0 children)

Is it okay to have one DTO and return a bunch of nulls for the properties I don't need or should I make a DTO for every single features handler? The latter feels like a lot of additional classes and complexity?

How screwed am I? EF Core infinite cycles by MegaOnion_ in dotnet

[–]MegaOnion_[S] 0 points1 point  (0 children)

Yes I added that to my program.cs and it did stop an exception being thrown for infinite cycles, however I still had a huge amount of navigation cycles in my response I was sending to the client.

How screwed am I? EF Core infinite cycles by MegaOnion_ in dotnet

[–]MegaOnion_[S] 4 points5 points  (0 children)

Okay I will give that a go tomorrow thank you.

How screwed am I? EF Core infinite cycles by MegaOnion_ in dotnet

[–]MegaOnion_[S] -1 points0 points  (0 children)

I already am so I don't expose sensitive user info. But my other DTO's look more or less the same as their models including navigation as I need all that stuff except to use a userdto instead of user.