tags:

views:

37

answers:

2

LINQ to SQL internally generates SQL queries and fire on the database after submitting changes. Is there any way we can wrap all these queries in some stored procedure and execute this store proc everytime when anything gets inserted or updated in the database.

Problem is only stored procedures are allowed to carry any insert or update or delete operations, direct queries are restricted for security purpose.

+1  A: 

I think so - see here

Preet Sangha
+1  A: 

You can create the sprocs, add them to your model using the O/R designer and call them from your code. AFAIK, that is all you can do with the stored procedures using LINQ...

kzen