ALMMa / datatables.aspnet

Microsoft AspNet bindings and automatic parsing for jQuery DataTables along with extension methods to help on data queries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This nuget is sadly unusable with many Entity Framework projects if the Json Reference Loop Handling cannot be configured

sora-1337 opened this issue · comments

commented

This has cost me a lot of time to figure out.
The huge issue I have sadly is that I found no way to configure the Reference Loop Handling when the data gets converted to json.
What's making this issue even worse is that this step happens entirely encapsulated in the Nuget itself and does not rely on a Newtonsoft.Json dependency nuget, so any configuration on a global level to configure the Reference Loop Handling behaviour will be straight up ignored and the error persists.

While trying to solve this I obviously dug through google and found a thread somewhere where the author said the only option is to pull the project myself and do the change hardcoded. What I dont like about this is a pretty huge overhead and no future safety if I were to update the nuget.

As time is precious, I had to take the decision to remove the nuget again and now start to implement the functionality manually.

If I am overseeing anything please link me a section in the documentation or a way how to configure the RefLoop behaviour without having to open and repack the entire project.

This is probably caused here:
https://github.com/ALMMa/datatables.aspnet/blob/master/src/DataTables.AspNet.AspNetCore/DataTablesResponse.cs#L162

Already mapped on #48

But for some quite interesting reason people tend to blame the author, fork the project and re-ship libraries instead of collaborating to improve for everyone.

¯\_(ツ)_/¯

I'll be plain honest: I want to come back here and make this project live again, but right now I don't have a workable PC anymore and I'm fully allocated on my job. Not sure if I'll be able to dig into pending stuff this year. However, if you want, submit a PR. I'll review/approve and ship libraries to Nuget.

I'm currently working back on this library and this will be fixed on the next release.

Accidentally closed, sorry.