Is there a hook somewhere within Linq to SQL that would allow me to manually modify a command before it is sent to the database?
Specifically, I am trying to introduce the WITH CHANGE_TRACKING_CONTEXT(@contextData)
syntax whenever an insert/update/delete is applied to the database in order to be able to add additional information against the change tracking, such as the user who instigated the change (this is a web application that uses SQL Authentication).
This syntax will simply need to be inserted at the beginning of the CommandText, along with an additional parameter (@contextData)
being added to the SqlCommand object which will contain the data for the additional statement.
Thanks in advance.