When I use the same Linq and pass it to Linq to SQL, the generated SQL is:
SELECT COUNT(*) AS [Count], [t1].[STATE] AS [State], [t1].[value] AS
[Assigned]
FROM (
SELECT [t0].[STATE],
(CASE
WHEN [t0].[ASSIGNED_TO] IS NULL THEN @p0
ELSE @p1
END) AS [value], [t0].[PROGRAM_YEAR]
FROM [test_schema].[SP_DOC] AS [t0]
) AS [t1]
WHERE [t1].[PROGRAM_YEAR] = @p2
GROUP BY [t1].[STATE], [t1].[value]
which is very close to what my intention is and executes and gives the
result that I wanted. So if this type of query cannot be parsed through
nHibernate, is it possible to still use this Linq as "native query" in
nHibernate just like other native queries?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/my37d7FnV8QJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.