4

I have tried to find this answer but cannot. What is generating the underlying SQL when using EF? Is it EF or the provider you are using? Also, is there any way to provide hints in order to change the way the SQL is generated?

Thanks in advance

2 Answers 2

4

Entity Framework takes your LINQ queries and examines them using Expression Trees.

The provider then uses those Expression Trees to generate the appropriate SQL statements.

MSDN has a very good explanation of Expression Trees and how they work.

Sign up to request clarification or add additional context in comments.

Comments

0

The only way you can generate "hints" is through the way you write your LINQ statements. The Provider is what generates the SQL.

If you decide you want to write your own proivider check out re-linq. White paper on re-linq (explains a lot about what it is..

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.