SQL query with params values #1228
Replies: 1 comment 3 replies
-
This is not an OData question but an EntityFrameworkCore question. The translation between Having said that, what you want to do is a really bad practice that opens you up for SQL injection. I don't immediately see a way to "configure" this in EFCore but I wouldn't open up that possibility if I was them either. Why do you need inlined parameters like that? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I am working on dynamic OData with EF core. I have use case to get the SQL query from the OData options. I achieved this by
var sql = queryOptions.ApplyTo(queryable, querySettings).ToQueryString()
It gives me below result
is it possible to get the SQL query with param values like below
SELECT EmpId, EmpName, EmpAge FROM public."Employee" WHERE EmpId = 2 and EmpName = 'ABC'
Beta Was this translation helpful? Give feedback.
All reactions