views:

225

answers:

0

Hi,

I was wondering if there is any way to intercept and modify the sql generated from linq to Sql before the query is sent off?

Basically, we have a record security layer, that given a query like 'select * from records' it will modify the query to be something like 'select * from records WHERE [somesecurityfilter]'

I am trying to find the best way to intercept and modify the sql before its executed by the linq to sql provider.