Azure-docs: Need clarification about whether it's PARAMETERIZED SQL that LINQ translates to?

Created on 30 Jun 2020  Â·  5Comments  Â·  Source: MicrosoftDocs/azure-docs

[Enter feedback here]
Hi team,

Could we clarify when LINQ transits to SQL, whether it's PARAMETERIZED SQL that it translates to?
And if possible, could we add comparison between LINQ-to-SQL and Parametrized SQL?

Thanks,
Hua


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cosmos-dsvc cxp product-question triaged

Most helpful comment

You can append toString() on the IQueryable generated by the LINQ Provider to examine how the query is passed to the service. Reference: https://stackoverflow.com/questions/41023747/how-can-i-trace-the-query-produced-by-the-documentdb-linq-provider

In this case - the LINQ Provider escapes the parameterized input as opposed to delegating this downstream.

All 5 comments

@HuaTang92 We are checking this and we will get back to you.

@timsander1 Please check this and provide insight into the same.

You can append toString() on the IQueryable generated by the LINQ Provider to examine how the query is passed to the service. Reference: https://stackoverflow.com/questions/41023747/how-can-i-trace-the-query-produced-by-the-documentdb-linq-provider

In this case - the LINQ Provider escapes the parameterized input as opposed to delegating this downstream.

@HuaTang92 Please let us know if you have any other question or we will go ahead and close the thread.

I made a minor doc update to add the ToString information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

monteledwards picture monteledwards  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

Favna picture Favna  Â·  3Comments

JamesDLD picture JamesDLD  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments