linq to sql using triggers
-
Tuesday, February 05, 2013 2:58 AM
In a C# 2008 desktop application that uses linq to sql, I just found out one of the tables now contains 3 triggers. The triggers are for insert, update, and delete on a sql server 2008 r2 database.
Thus in the linq visual designer, I am assuming that I will need to drag the triggers on to the designer surface. My question is where should I drag the 3 triggers? Would I drag the triggers onto the area for stored procedures?
Can you tell me and/or point me to a reference that will tell me how to work with the triggers using linq to sql?
All Replies
-
Tuesday, February 05, 2013 8:09 AM
You can't operate with triggers on LINQ layer, because it's database objects, it is bounded directly to the database table and are executed when one of the CRUD (Create, Update, Delete) action is performed on the table.
They can't survive standalone and you can't execute them manually.
Please Mark as Reply and Vote as Helpful if I helped.
Also please visit my blog http://msguy.net/- Edited by Michael Samteladze Tuesday, February 05, 2013 8:10 AM
- Marked As Answer by wendy elizabeth Wednesday, February 06, 2013 2:10 AM

