Can entity framework support SQL queries that use CTE / row-numbers in the
<DefiningQuery> </DefiningQuery>
attribute of the .edmx file?
This in regards to a query given to me in this post that uses such features: Complex / Algorithmic SQL Query
I am getting the following InnerException from sql:
Incorrect syntax near the keyword 'with'.
Incorrect syntax near the keyword 'with'. If this statement is a common table ex
pression, an xmlnamespaces clause or a change tracking context clause, the previ
ous statement must be terminated with a semicolon.
Incorrect syntax near ','.
Incorrect syntax near ','.
Incorrect syntax near ')'.
Adding the semi-colon before the opening 'with' statement does not resolve the issue. It says incorrect syntax near ';' in that case.
If unsupported, I think I could bind a stored procedure to a complex entity, but are there any other options?
Thanks.
CREATE VIEW yourview AS with events as ...and i.row=o.rowDoes that make things any easier?