Subsonic 3 LINQ Projection issue, fixed or no?

我与影子孤独终老i 提交于 2019-12-04 07:29:33
quentin-starin

If you (me) modify SubSonic.Core according to the answer here: Subsonic 3.0 and linq

Then the projection works correctly.

However, I consider this a very bad solution as it requires forking a project and introducing an order of magnitude performance decrease.

Could you send me a little bit more code (especially what's behind _pulseQuery and _accountQuery) so I can fix this issue. Are you using SimpleRepository or the ActiveRecord approach or Query objects directly?

Reviving an old topic here, but in case someone searches for this later...

I also "fixed" this same issue, and put some explanation in the comments, in my fork on GitHub in this commit: https://github.com/rally25rs/SubSonic-3.0/commit/61af6aeb2ebb95f486d8df533bf13c8754d443e2

There is actually a slightly deeper issue here too. If you choose to use the "standard .NET built-in" projections, then some of the SubSonic unit tests start to fail, because SS does some extra stuff in its projection generation that the .NET projection doesn't do, so some of the expected functionality of SS doesn't work.

Personally, I think that, and the slower performance (though I haven't noticed a speed decrease) is a small price to pay for correct data.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!