What is the best way to add a trigger to a table created by code-first approach with EF 4.1?
A way I\'m cosidering is to execute a custom SQL query either in OnModel
I'm not entirely sure what you mean. If you want an actual SQL trigger on the table, then I'd create the trigger, as normal, in SQL. If you mean you want some kind of processing/updating to occur in your code whenever one of you entity sets is modified, then I think you'd want to do a custom method that would be called whenever that entity set is updated.