Roslyn missing filters

18 views
Skip to first unread message

GDS6s

unread,
Nov 18, 2021, 2:54:38 PM11/18/21
to nhusers
Hello, i have created a module that compile a dll with Roslyn on platform .net core, that use NHIbernate to execute query.It's works but during a test checking  sql profiler the where condition it's missing, but the filter was done in memory by nhibernate becouse the result on my code was filterd.If i try to compile the same code with VisualStudio 2019 it's ok becouse the same query on sql profiler has the where condition.Have you idea why ?

Gunnar Liljas

unread,
Nov 18, 2021, 4:50:16 PM11/18/21
to nhu...@googlegroups.com
Maybe you have used Enumerable.Where instead of Queryable.Where?

On Thu, Nov 18, 2021 at 8:54 PM 'GDS6s' via nhusers <nhu...@googlegroups.com> wrote:
Hello, i have created a module that compile a dll with Roslyn on platform .net core, that use NHIbernate to execute query.It's works but during a test checking  sql profiler the where condition it's missing, but the filter was done in memory by nhibernate becouse the result on my code was filterd.If i try to compile the same code with VisualStudio 2019 it's ok becouse the same query on sql profiler has the where condition.Have you idea why ?

--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nhusers/764a2692-33af-4932-8de8-fc920ec233f7n%40googlegroups.com.

c.an...@libero.it

unread,
Nov 22, 2021, 9:55:50 AM11/22/21
to nhu...@googlegroups.com

Hello i cheked my code but i already use IQuerable, have you other suggestion ?

Bye

--
Inviato da Libero Mail per Android

giovedì, 18 novembre 2021, 10:50PM +01:00 da Gunnar Liljas gunnar...@gmail.com:

You received this message because you are subscribed to a topic in the Google Groups "nhusers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nhusers/6nofz8eENFQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nhusers+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nhusers/CAAOnFsNi352G0WEYnOS1eMHC7t7iYUOeKkDXjNJKmGhFaDi%3DVw%40mail.gmail.com.

Gunnar Liljas

unread,
Nov 22, 2021, 10:56:06 AM11/22/21
to nhu...@googlegroups.com
Not really, no. Maybe you could create a Roslyn syntax tree of the working code and compare?

Also, what is the purpose of the compiled module?

c.an...@libero.it

unread,
Nov 22, 2021, 6:07:39 PM11/22/21
to nhu...@googlegroups.com

I have already done the compare  and the code it's different, the purpose Is to allow a customer to create a script.I asked you becouse it'really difficult for me to know in what situation nhibernate apply the filter from the code and not directly into SQL query.Have you amy suggestion about this check ?

Bye

--
Inviato da Libero Mail per Android

lunedì, 22 novembre 2021, 04:56PM +01:00 da Gunnar Liljas gunnar...@gmail.com:

Reply all
Reply to author
Forward
0 new messages