1

I have come across this topic and I did read the documentation in the MSDN website but I can't digest it. What I could understand so far is that these might be similar to Triggers or Stored Procedures in SQL but I'm unsure to what extent what I think is true.

So I decided to post the question so that someone would explain to me in simple words what Query Interception is ? Is it only related to WCF or is it available in EF as well?

Arnold Zahrneinder
  • 4,788
  • 10
  • 40
  • 76
  • Query Interception is available in Entity Framework 6, and does pretty much exactly what the name suggests. Whenever EF generates a query to execute against your DbContext you can intercept and modify the query along with the result that is returned from the query. Here is an ariticle you might find useful: http://www.skylinetechnologies.com/Blog/Article/2394/Entity-Framework-60-Intercepting-SQL-produced-by-EF.aspx – ajliptak Jun 17 '15 at 19:59
  • @ajliptak: The article was of no use, already came across that, but `you can intercept and modify the query along with the result that is returned from the query`, what does this mean, can you give me one real world example? – Arnold Zahrneinder Jun 17 '15 at 21:21
  • @ajliptak: If I wanna make a dynamic query or reuse one, I can traditionally make a method that returns an expression, why do I need it to use Interception and why did they have to add something to EF at all ? – Arnold Zahrneinder Jun 17 '15 at 21:22

0 Answers0